3 if git rev-parse
--verify HEAD
>/dev
/null
2>&1
7 # Initial commit: diff against an empty tree object
8 against
=4b825dc642cb6eb9a060e54bf8d69288fbee4904
11 FILES
=$
(git diff-index
--name-only --diff-filter=ACMR
--cached $against -- |
egrep ".py$")
12 if [ "$FILES" != "" ]; then
13 # We want to look at the staged version only, so we have to run it once for
17 P
=$
(git show
":$F" | python3
-c "import sys; compile(sys.stdin.read(), '/dev/null', 'exec')")
18 if [ "$?" != "0" ]; then
25 R
=$
(git show
":$F" | pycodestyle
-)
26 if [ "$?" != "0" ]; then
32 if [ "$E" != "0" ]; then
36 echo Basic python checks passed.