Use black to reformat Flake8

Instead of just using Flake8 and pylint to keep Flake8 clean, let's also
use black to make it less manual for clean-up.
This commit is contained in:
Ian Stapleton Cordasco 2018-10-20 07:31:42 -05:00
parent a2b7a7e4c5
commit c58a4662d8
No known key found for this signature in database
GPG key ID: C9D7A2604B4FCB2A
27 changed files with 1052 additions and 812 deletions

16
tox.ini
View file

@ -23,12 +23,22 @@ basepython = python2.7
skip_install = true
deps =
wheel
flake8-colors
commands =
python setup.py -qq bdist_wheel
pip install -U --pre --find-links ./dist/ flake8
pip install --force-reinstall -U --pre --find-links ./dist/ flake8
flake8 --version
flake8 src/flake8/ tests/ setup.py
# Autoformatter
[testenv:black]
basepython = python3
skip_install = true
deps =
black
commands =
black -l 78 -N src/
# Linters
[testenv:flake8]
basepython = python3
@ -80,12 +90,14 @@ commands =
basepython = python3
skip_install = true
deps =
{[testenv:black]deps}
{[testenv:flake8]deps}
{[testenv:pylint]deps}
{[testenv:doc8]deps}
{[testenv:readme]deps}
{[testenv:bandit]deps}
commands =
{[testenv:black]commands}
{[testenv:flake8]commands}
{[testenv:pylint]commands}
{[testenv:doc8]commands}
@ -143,7 +155,7 @@ commands =
# defaults to selecting all other errors so we do not need select=E,F,W,I,D
# Once Flake8 3.0 is released and in a good state, we can use both and it will
# work well \o/
ignore = D203, W504
ignore = D203, W503, E203
exclude =
.tox,
.git,