Move flake8 config from tox.ini to setup.cfg

I was debugging some E203 issue, and then it took me some time to figure
out where flake8's own config would be - `tox.ini` is specific to tox in
general, and `setup.cfg` is a more canonical place.
This commit is contained in:
Daniel Hahler 2018-10-31 00:21:15 +01:00
parent 4439ea2025
commit 614e308661
2 changed files with 24 additions and 25 deletions

View file

@ -16,3 +16,27 @@ requires-dist =
pyflakes >= 2.0.0, < 2.1.0
pycodestyle >= 2.4.0, < 2.5.0
mccabe >= 0.6.0, < 0.7.0
[flake8]
# Ignore some flake8-docstrings errors
# NOTE(sigmavirus24): While we're still using flake8 2.x, this ignore line
# 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, W503, E203
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
build,
dist,
tests/fixtures/*,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 10
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s

25
tox.ini
View file

@ -147,28 +147,3 @@ deps =
commands =
{[testenv:build]commands}
twine upload --skip-existing dist/*
# Flake8 Configuration
[flake8]
# Ignore some flake8-docstrings errors
# NOTE(sigmavirus24): While we're still using flake8 2.x, this ignore line
# 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, W503, E203
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
build,
dist,
tests/fixtures/*,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 10
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s