diff options
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 28 |
1 files changed, 24 insertions, 4 deletions
@@ -1,5 +1,5 @@ [tox] -envlist = py3, xenial-dev, flake8, pylint +envlist = py3, xenial-dev, flake8, pylint, black, isort recreate = True [testenv] @@ -29,6 +29,27 @@ deps = -r{toxinidir}/integration-requirements.txt commands = {envpython} -m pylint {posargs:cloudinit tests tools} +[testenv:black] +basepython = python3 +deps = + # requirements + black==21.12b0 +commands = {envpython} -m black . --check + +[testenv:isort] +basepython = python3 +deps = + isort==5.10.1 +commands = {envpython} -m isort . --check-only + +[testenv:format] +basepython = python3 +deps = + black==21.12b0 + isort==5.10.1 +commands = + {envpython} -m isort . + {envpython} -m black . [testenv:py3] basepython = python3 @@ -44,10 +65,9 @@ basepython = python2.7 deps = -r{toxinidir}/test-requirements.txt [flake8] -# E226: missing whitespace around arithmetic operator +# E203: whitespace before ':', doesn't adhere to pep8 or black formatting # W503: line break before binary operator -# W504: line break after binary operator -ignore=E226,W503,W504 +ignore=E203,W503 exclude = .venv,.tox,dist,doc,*egg,.git,build,tools per-file-ignores = cloudinit/cmd/main.py:E402 |