Files
tildes/git_hooks/pre-push
Deimos 5eecb189ac Update mypy to 0.730
There are some new capabilities in mypy 0.730, including nicer output
formatting, which this enables. I'd also like to be able to use the
specific error-code ignoring instead of the current all-encompassing
"type: ignore" comments, but there's currently an issue with that:
https://github.com/python/mypy/issues/7562
2019-09-26 12:10:49 -06:00

12 lines
540 B
Bash
Executable File

#!/bin/sh
#
# Pre-push hook script that ensures mypy checks, style checks, and tests pass
vagrant ssh -c ". activate \
&& echo 'Checking mypy type annotations...' && mypy --no-error-summary . \
&& echo 'Checking if Black would reformat any code...' && black --check . \
&& echo -n 'Running tests: ' && pytest -q \
&& echo 'Checking SCSS style...' && npm run --silent lint:scss \
&& echo 'Checking JS style...' && npm run --silent lint:js \
&& echo 'Checking Python style fully (takes a while)...' && prospector -M"