Skip to content

Commit

Permalink
Limit fakeredis version (#17)
Browse files Browse the repository at this point in the history
* downgrade fakeredis version to 2.16.0

* add fakeredis range

* provide range for fakeredis and reason why

Signed-off-by: Nicolas Höning <nicolas@seita.nl>

* support modern typing syntax

Signed-off-by: Nicolas Höning <nicolas@seita.nl>

* make sure modern mypy is used

Signed-off-by: Nicolas Höning <nicolas@seita.nl>

---------

Signed-off-by: Nicolas Höning <nicolas@seita.nl>
Co-authored-by: Nicolas Höning <nicolas@seita.nl>
  • Loading branch information
Ahmad-Wahid and nhoening committed Jul 26, 2023
1 parent 8271f81 commit e83466e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions flexmeasures_openweathermap/utils/locating.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Tuple, List, Optional

import click
Expand Down
2 changes: 2 additions & 0 deletions flexmeasures_openweathermap/utils/owm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import Tuple, List, Dict, Optional
import os
from datetime import datetime, timedelta
Expand Down
3 changes: 2 additions & 1 deletion requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion run_mypy.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e83466e

Please sign in to comment.