From fcd6b8767087f59e376dd6b6a6522d626da7d651 Mon Sep 17 00:00:00 2001 From: Moritz Makowski Date: Wed, 5 Jun 2024 22:43:19 +0000 Subject: [PATCH] Fix mypy issues --- pdm.lock | 2 +- src/export/dataframes.py | 2 +- src/retrieval/utils/ils.py | 2 +- src/retrieval/utils/invparms_files.py | 2 +- src/retrieval/utils/pressure_averaging.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pdm.lock b/pdm.lock index 9f40df04..1961dc47 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev"] strategy = ["cross_platform", "inherit_metadata"] lock_version = "4.4.1" -content_hash = "sha256:5cbcc6de588bd01baa8686d1acc20e705befd45e49e7c941255fdafdfda395b2" +content_hash = "sha256:64b94e78ef3bdc37d984cca9d56f73b759d69f786076951881dcc55d15f6d12b" [[package]] name = "annotated-types" diff --git a/src/export/dataframes.py b/src/export/dataframes.py index 4cfcde2c..a8323f14 100644 --- a/src/export/dataframes.py +++ b/src/export/dataframes.py @@ -114,7 +114,7 @@ def get_sensor_dataframe( "utc", *[column_names[t] for t in all_data_types], ], - dtypes={ + schema_overrides={ "utc": pl.Datetime, **{column_names[t]: pl.Float32 for t in all_data_types}, diff --git a/src/retrieval/utils/ils.py b/src/retrieval/utils/ils.py index cf23b3d4..5b94278c 100644 --- a/src/retrieval/utils/ils.py +++ b/src/retrieval/utils/ils.py @@ -34,7 +34,7 @@ def get_ils_params(serial_number: int, date: datetime.date) -> ILSParams: "CHANNEL2_PE", "VALID_SINCE", ], - dtypes={ + schema_overrides={ "SERIAL_NUMBER": pl.Utf8, "CHANNEL1_ME": pl.Float64, "CHANNEL1_PE": pl.Float64, diff --git a/src/retrieval/utils/invparms_files.py b/src/retrieval/utils/invparms_files.py index 1645c17d..1d3986a7 100644 --- a/src/retrieval/utils/invparms_files.py +++ b/src/retrieval/utils/invparms_files.py @@ -46,7 +46,7 @@ def read_and_merge_invparms_files(paths: list[str]) -> Optional[pl.DataFrame]: "XCH4_S5P", "XCO", ], - dtypes={ + schema_overrides={ "JulianDate": pl.Float64, "HHMMSS_ID": str, # type: ignore "SX": str, # type: ignore diff --git a/src/retrieval/utils/pressure_averaging.py b/src/retrieval/utils/pressure_averaging.py index 729457eb..18a4109f 100644 --- a/src/retrieval/utils/pressure_averaging.py +++ b/src/retrieval/utils/pressure_averaging.py @@ -48,7 +48,7 @@ def compute_mean_pressure_around_noon( ) -> float: df = pl.read_csv( filepath, - dtypes={ + schema_overrides={ "UTCtime___": pl.Utf8, "BaroYoung": pl.Float64, },