forked from orbit-oss/flask
Set up pre-commit to run black
Call it automatically via tox
This commit is contained in:
parent
819368a52d
commit
5b309831ec
2 changed files with 10 additions and 0 deletions
5
.pre-commit-config.yaml
Normal file
5
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/python/black
|
||||||
|
rev: 19.3b0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
5
tox.ini
5
tox.ini
|
|
@ -37,6 +37,11 @@ commands =
|
||||||
# pytest-cov doesn't seem to play nice with -p
|
# pytest-cov doesn't seem to play nice with -p
|
||||||
coverage run -p -m pytest tests examples
|
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]
|
[testenv:docs-html]
|
||||||
deps =
|
deps =
|
||||||
-r docs/requirements.txt
|
-r docs/requirements.txt
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue