File: mypy-run.sh

package info (click to toggle)
python-stone 3.3.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,036 kB
  • sloc: python: 22,311; objc: 498; sh: 23; makefile: 11
file content (8 lines) | stat: -rwxr-xr-x 275 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
#!/bin/bash -eux

EXCLUDE='(^example/|^ez_setup\.py$|^setup\.py$)'

# Include all Python files registered in Git, that don't occur in $EXCLUDE.
INCLUDE=$(git ls-files "$@" | grep '\.py$' | grep -Ev "$EXCLUDE" | tr '\n' '\0' | xargs -0 | cat)
MYPY_CMD=mypy
$MYPY_CMD $INCLUDE