Set up pre-commit to run black

Call it automatically via tox
This commit is contained in:
David Baumgold 2019-05-06 15:39:19 -04:00
parent 819368a52d
commit 5b309831ec
2 changed files with 10 additions and 0 deletions

5
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,5 @@
repos:
- repo: https://github.com/python/black
rev: 19.3b0
hooks:
- id: black

View file

@ -37,6 +37,11 @@ commands =
# pytest-cov doesn't seem to play nice with -p
coverage run -p -m pytest tests examples
[testenv:stylecheck]
deps = pre-commit
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:docs-html]
deps =
-r docs/requirements.txt