From c3b178768f37be8d834a1b9122ecd8baa05bad32 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 19 Jan 2021 21:43:24 +0100 Subject: [PATCH] Use can_mypy rather than just checking for mypy As indicated in the comments in the can_mypy function, we don't just need a mypy executable to be present, we need it to work. Signed-off-by: Gilles Peskine --- tests/scripts/check-python-files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/check-python-files.sh b/tests/scripts/check-python-files.sh index d82ea746c6..322e92b505 100755 --- a/tests/scripts/check-python-files.sh +++ b/tests/scripts/check-python-files.sh @@ -74,7 +74,7 @@ $PYTHON -m pylint -j 2 scripts/mbedtls_dev/*.py scripts/*.py tests/scripts/*.py } # Check types if mypy is available -if type mypy >/dev/null 2>/dev/null; then +if can_mypy; then echo echo 'Running mypy ...' mypy scripts/*.py tests/scripts/*.py ||