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 <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-01-19 21:43:24 +01:00
parent bdde5d002c
commit c3b178768f

View File

@ -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 ||