From e9d0611be6e09a628b832e4c5beba9905cd2eb26 Mon Sep 17 00:00:00 2001 From: Bart Schilperoort Date: Sun, 30 Jul 2023 11:13:02 +0200 Subject: [PATCH] Make py38 compatible. Set python_version in mypy config --- pyproject.toml | 1 + src/dtscalibration/datastore_utils.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3650bfb8..1fdadfda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -188,6 +188,7 @@ target-version = ['py39', 'py310', 'py311'] [tool.mypy] ignore_missing_imports = true # Preferably false, but matplotlib, scipy and statsmodels are missing typing stubs +python_version = "3.9" [tool.coverage.run] branch = true diff --git a/src/dtscalibration/datastore_utils.py b/src/dtscalibration/datastore_utils.py index 5bdbb055..fe23f53c 100644 --- a/src/dtscalibration/datastore_utils.py +++ b/src/dtscalibration/datastore_utils.py @@ -1,6 +1,7 @@ # coding=utf-8 from typing import TYPE_CHECKING from typing import Optional +from typing import Union import matplotlib.pyplot as plt import numpy as np @@ -13,7 +14,7 @@ def check_dims( ds: "DataStore", - labels: list[str] | tuple[str], + labels: Union[list[str], tuple[str]], correct_dims: Optional[tuple[str]] = None, ) -> None: """