diff --git a/flexmeasures_openweathermap/utils/locating.py b/flexmeasures_openweathermap/utils/locating.py index 4506ce5..1be8d06 100644 --- a/flexmeasures_openweathermap/utils/locating.py +++ b/flexmeasures_openweathermap/utils/locating.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Tuple, List, Optional import click diff --git a/flexmeasures_openweathermap/utils/owm.py b/flexmeasures_openweathermap/utils/owm.py index a35cf33..35c98f0 100644 --- a/flexmeasures_openweathermap/utils/owm.py +++ b/flexmeasures_openweathermap/utils/owm.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Tuple, List, Dict, Optional import os from datetime import datetime, timedelta diff --git a/requirements/test.in b/requirements/test.in index 8c1f66e..3f3e08b 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -5,6 +5,7 @@ pytest-flask pytest-sugar pytest-cov # lets tests run successfully in containers -fakeredis +# Upper limit because latest versions do not support latest Redis sometimes +fakeredis >2.14, <2.17.0 # required with fakeredis, maybe because we use rq lupa diff --git a/run_mypy.sh b/run_mypy.sh index 3a25475..8a09af5 100755 --- a/run_mypy.sh +++ b/run_mypy.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -pip install mypy +pip install --upgrade mypy > 1.4 pip install types-pytz types-requests types-Flask types-click types-redis types-tzlocal types-python-dateutil types-setuptools files=$(find . -name \*.py -not -path "./venv/*" -not -path ".eggs/*" -not -path "./build/*" -not -path "./dist/*" -not -path "./scripts/*") mypy --follow-imports skip --ignore-missing-imports $files