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>
diff --git a/tests/scripts/check-python-files.sh b/tests/scripts/check-python-files.sh
index d82ea74..322e92b 100755
--- a/tests/scripts/check-python-files.sh
+++ b/tests/scripts/check-python-files.sh
@@ -74,7 +74,7 @@
}
# 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 ||