From df57835a769acb15c818e4379105310ec2fb338e Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 28 Feb 2022 16:06:36 +0100 Subject: [PATCH] Make mypy unconditional Running mypy was optional for a transition period when it wasn't installed on the CI. Now that it is, make it mandatory, to avoid silently skipping an expected check if mypy doesn't work for some reason. Signed-off-by: Gilles Peskine --- tests/scripts/check-python-files.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/scripts/check-python-files.sh b/tests/scripts/check-python-files.sh index 449803a54..dbf036532 100755 --- a/tests/scripts/check-python-files.sh +++ b/tests/scripts/check-python-files.sh @@ -17,7 +17,7 @@ # Purpose: check Python files for potential programming errors or maintenance # hurdles. Run pylint to detect some potential mistakes and enforce PEP8 -# coding standards. If available, run mypy to perform static type checking. +# coding standards. Run mypy to perform static type checking. # We'll keep going on errors and report the status at the end. ret=0 @@ -72,12 +72,9 @@ $PYTHON -m pylint -j 2 scripts/mbedtls_dev/*.py scripts/*.py tests/scripts/*.py ret=1 } -# Check types if mypy is available -if can_mypy; then - echo - echo 'Running mypy ...' - $PYTHON -m mypy scripts/*.py tests/scripts/*.py || - ret=1 -fi +echo +echo 'Running mypy ...' +$PYTHON -m mypy scripts/*.py tests/scripts/*.py || + ret=1 exit $ret