[CI/Build] Improve mypy + python version matrix (#10041)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user