cinder/tools/mypywrap.sh
Eric Harney d3807bb59a mypy: Print mypy version used
"tox -e mypy" doesn't show which version of
mypy is being used, add this for convenience.

Change-Id: Ic0fc286d78ab4040d005507948c7019d2949f471
2024-10-24 20:08:04 +00:00

27 lines
764 B
Bash
Executable File

#!/bin/bash
#
# A wrapper around mypy that allows us to specify what files to run 'mypy' type
# checks on. Intended to be invoked via tox:
#
# tox -e mypy
#
# Eventually this should go away once we have either converted everything or
# converted enough and ignored [1] the rest.
#
# [1] http://mypy.readthedocs.io/en/latest/config_file.html#per-module-flags
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#export MYPYPATH=$ROOT_DIR/../cinder/tests/stubs/
python -m mypy -V
if [ $# -eq 0 ]; then
# if no arguments provided, use the standard converted lists
lines=$(grep -v '#' $ROOT_DIR/../mypy-files.txt)
python -m mypy $OS_MYPY_OPTS ${lines[@]}
else
# else test what the user asked us to
python -m mypy $OS_MYPY_OPTS $@
fi