Files
tildes/git_hooks/pre-commit
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

11 lines
447 B
Bash
Executable File

#!/bin/sh
#
# Pre-commit hook script that ensures mypy 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"