From 0370c1710537064c66fbb919c0924a5596bd160c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 19 Jan 2021 21:58:09 +0100 Subject: [PATCH] mypy: require at least version 0.780 0.780 works. The previous release, 0.770, does not. Signed-off-by: Gilles Peskine --- tests/scripts/check-python-files.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/scripts/check-python-files.sh b/tests/scripts/check-python-files.sh index 5796c29b6..449803a54 100755 --- a/tests/scripts/check-python-files.sh +++ b/tests/scripts/check-python-files.sh @@ -49,11 +49,10 @@ can_pylint () { } can_mypy () { - # Just check that mypy is present and looks sane. I don't know what - # minimum version is required. The check is not just "type mypy" - # because that passes if a mypy exists but is not installed for the current - # python version. - $PYTHON -m mypy --version 2>/dev/null >/dev/null + # mypy 0.770 is too old: + # tests/scripts/test_psa_constant_names.py:34: error: Cannot find implementation or library stub for module named 'mbedtls_dev' + # mypy 0.780 from pip passed on the first commit containing this line. + check_version mypy.version 0.780 } # With just a --can-xxx option, check whether the tool for xxx is available