Configuration tweaks fox tox/travis to use and check Black

This commit is contained in:
decentral1se 2019-11-25 17:20:34 +01:00 committed by Alexandre Aubin
parent 581275aeed
commit 6f5daa0c38
3 changed files with 24 additions and 1 deletions

View file

@ -6,6 +6,8 @@ matrix:
env: TOXENV=py27 env: TOXENV=py27
- python: 2.7 - python: 2.7
env: TOXENV=lint env: TOXENV=lint
- python: 3.6
env: TOXENV=format-check
- python: 2.7 - python: 2.7
env: TOXENV=docs env: TOXENV=docs

View file

@ -1,2 +1,8 @@
[flake8] [flake8]
ignore = E501,E128,E731,E722 ignore =
E501,
E128,
E731,
E722,
W503 # Black formatter conflict
E203 # Black formatter conflict

15
tox.ini
View file

@ -28,6 +28,21 @@ deps = flake8
skip_install = True skip_install = True
usedevelop = False usedevelop = False
[testenv:format]
basepython = python3
commands = black {posargs} moulinette test
deps = black
skip_install = True
usedevelop = False
[testenv:format-check]
basepython = {[testenv:format]basepython}
commands = black {posargs:--check --diff} moulinette test
deps = {[testenv:format]deps}
skip_install = {[testenv:format]skip_install}
usedevelop = {[testenv:format]usedevelop}
[testenv:docs] [testenv:docs]
usedevelop = True usedevelop = True
commands = python -m sphinx -W doc/ doc/_build commands = python -m sphinx -W doc/ doc/_build