[CI/Build] Improve mypy + python version matrix (#10041)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant
2024-11-07 07:54:16 +00:00
committed by GitHub
parent 6192e9b8fe
commit e036e527a0
3 changed files with 5 additions and 6 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
#!/bin/bash
CI=${1:-0}
PYTHON_VERSION=${2:-3.9}
if [ $CI -eq 1 ]; then
set -e
@@ -9,10 +10,10 @@ fi
run_mypy() {
echo "Running mypy on $1"
if [ $CI -eq 1 ] && [ -z "$1" ]; then
mypy "$@"
mypy --python-version "${PYTHON_VERSION}" "$@"
return
fi
mypy --follow-imports skip "$@"
mypy --follow-imports skip --python-version "${PYTHON_VERSION}" "$@"
}
run_mypy # Note that this is less strict than CI