File: mypywrap.sh

package info (click to toggle)
python-os-brick 6.13.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,240 kB
  • sloc: python: 20,500; sh: 92; makefile: 23
file content (26 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
#
# 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/../os_brick/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