diff --git a/.travis.yml b/.travis.yml index ece3ead2..f44e6cfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ matrix: env: TOXENV=py27 - python: 2.7 env: TOXENV=lint + - python: 3.6 + env: TOXENV=format-check - python: 2.7 env: TOXENV=docs diff --git a/setup.cfg b/setup.cfg index db1dde69..71be731f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,8 @@ [flake8] -ignore = E501,E128,E731,E722 +ignore = + E501, + E128, + E731, + E722, + W503 # Black formatter conflict + E203 # Black formatter conflict diff --git a/tox.ini b/tox.ini index feeb4faa..85021c0d 100644 --- a/tox.ini +++ b/tox.ini @@ -28,6 +28,21 @@ deps = flake8 skip_install = True 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] usedevelop = True commands = python -m sphinx -W doc/ doc/_build