Add pytest and mypy steps to the pre-commit hooks to avoid committing clearly broken code

This commit is contained in:
Danielle McLean 2018-06-04 10:32:24 +10:00
parent d91676289b
commit f551a5214a
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240
2 changed files with 20 additions and 3 deletions

View file

@ -15,3 +15,17 @@ repos:
args:
- --fix=lf
- id: trailing-whitespace
- repo: local
hooks:
- id: pytest
name: Check pytest unit tests pass
entry: pipenv run pytest
pass_filenames: false
language: system
types: [python]
- id: mypy
name: Check mypy static types match
entry: pipenv run mypy . --ignore-missing-imports
pass_filenames: false
language: system
types: [python]