mirror of
https://gitlab.com/tildes/tildes.git
synced 2026-04-16 14:28:32 +02:00
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
11 lines
447 B
Bash
Executable File
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"
|