diff --git a/test-requirements.txt b/test-requirements.txt index 1d03eceec..9ee86eedf 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -16,4 +16,4 @@ pycodestyle==2.6.0 # MIT doc8>=0.8.1 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD bandit>=1.6.0,<1.7.0 # Apache-2.0 -mypy>=0.782 # MIT +mypy>=0.910 # MIT diff --git a/tools/mypywrap.sh b/tools/mypywrap.sh index 6ff309ff1..4fcb28c08 100644 --- a/tools/mypywrap.sh +++ b/tools/mypywrap.sh @@ -17,8 +17,8 @@ export MYPYPATH=$ROOT_DIR/../os_brick/tests/stubs/ if [ $# -eq 0 ]; then # if no arguments provided, use the standard converted lists lines=$(grep -v '#' $ROOT_DIR/../mypy-files.txt) - python -m mypy ${lines[@]} + python -m mypy $OS_MYPY_OPTS ${lines[@]} else # else test what the user asked us to - python -m mypy $@ + python -m mypy $OS_MYPY_OPTS $@ fi diff --git a/tox.ini b/tox.ini index 25fa13842..a9b0d15f0 100644 --- a/tox.ini +++ b/tox.ini @@ -140,5 +140,7 @@ usedevelop = False [testenv:mypy] description = Run type checks. +setenv = + OS_MYPY_OPTS=--install-types --non-interactive commands = bash tools/mypywrap.sh {posargs}