diff --git a/tests/scripts/check-python-files.sh b/tests/scripts/check-python-files.sh index df4821a33..d82ea746c 100755 --- a/tests/scripts/check-python-files.sh +++ b/tests/scripts/check-python-files.sh @@ -28,19 +28,24 @@ else PYTHON=python fi +check_version () { + $PYTHON - "$2" </dev/null --version | awk ' - BEGIN {status = 1} - /^(pylint[0-9]*|__main__\.py) +[0-9]+\.[0-9]+/ { - split($2, version, /[^0-9]+/); - status = !(version[1] >= 2 || (version[1] == 1 && version[2] >= 8)); - exit; # executes the END block - } - END {exit status} - ' + check_version pylint 1.8.3 } can_mypy () {