Skip to content
Snippets Groups Projects
Commit ce167433 authored by Max Drexler's avatar Max Drexler
Browse files

mypy configuration

parent 9294f4f4
No related branches found
No related tags found
No related merge requests found
Pipeline #53709 failed
......@@ -11,4 +11,4 @@ from grib_processor.main import main
if __name__ == "__main__":
sys.exit(main())
sys.exit(main()) # type: ignore[func-returns-value]
......@@ -15,7 +15,7 @@ from typing import Generator
import grib2io
from ssec_amqp import utils as amqp_utils
from typing_extensions import Literal, TypedDict
from typing_extensions import Literal, TypedDict, TypeAlias
from grib_processor import data
......@@ -25,6 +25,9 @@ if sys.version_info < (3, 9):
else:
import importlib.resources as resources
# Custom types
IsoStr: TypeAlias = str
# Contains a serializable mapping of first_lat, first_lon, rows, cols,
# and generating_process_ids to xcd model names and ids.
#
......@@ -55,8 +58,8 @@ class GribMetadata(TypedDict):
last_lon: float | None
forecast_hour: int
run_hour: int
model_time: datetime
start_time: datetime
model_time: IsoStr
start_time: IsoStr
projection: str
center_id: int
center_desc: str
......@@ -82,7 +85,7 @@ class GribPayload(GribMetadata):
the file and server itself.
"""
__payload_gen_time__: datetime
__payload_gen_time__: IsoStr
__injector_script__: str
path: str
directory: str
......
......@@ -35,3 +35,10 @@ packages = ["grib_processor"]
[tool.setuptools.dynamic]
version = {attr = "grib_processor.__version__"}
[tool.mypy]
python_version = "3.8"
disable_error_code = [
"import-untyped",
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment