From c27fa486698e441ebc16448ee93e5539cb885ced Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sat, 8 Jun 2019 08:02:45 +0200 Subject: [PATCH] chore: add a tox job to run black Allow lines to be 88 chars long for flake8. --- tox.ini | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index b905c72d8..ac34542a1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 1.6 skipsdist = True -envlist = py36,py35,py34,py27,pep8 +envlist = py36,py35,py34,py27,pep8,black [testenv] setenv = VIRTUAL_ENV={envdir} @@ -18,11 +18,20 @@ commands = commands = flake8 {posargs} gitlab/ +[testenv:black] +basepython = python3 +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + black +commands = + black {posargs} gitlab + [testenv:venv] commands = {posargs} [flake8] exclude = .git,.venv,.tox,dist,doc,*egg,build, +max-line-length = 88 ignore = H501,H803 [testenv:docs]