Browse Source

Add Black format check to git hooks

merge-requests/26/head
Deimos 6 years ago
parent
commit
1a2b5a8593
  1. 1
      git_hooks/pre-commit
  2. 3
      git_hooks/pre-push

1
git_hooks/pre-commit

@ -4,4 +4,5 @@
vagrant ssh -c ". activate \ vagrant ssh -c ". activate \
&& echo 'Checking mypy type annotations...' && mypy . \ && echo 'Checking mypy type annotations...' && mypy . \
&& echo 'Checking if Black would reformat any code...' && black --check . \
&& echo -n 'Running tests: ' && pytest -q" && echo -n 'Running tests: ' && pytest -q"

3
git_hooks/pre-push

@ -4,5 +4,6 @@
vagrant ssh -c ". activate \ vagrant ssh -c ". activate \
&& echo 'Checking mypy type annotations...' && mypy . \ && echo 'Checking mypy type annotations...' && mypy . \
&& echo 'Checking if Black would reformat any code...' && black --check . \
&& echo -n 'Running tests: ' && pytest -q \ && echo -n 'Running tests: ' && pytest -q \
&& echo 'Checking code style (takes a while)...' && pylama"
&& echo 'Checking code style fully (takes a while)...' && pylama"
Loading…
Cancel
Save