flake8 3.0.4 no longer excludes .tox
Please provide the following version information
Note: all of this information was collected within my tox py35 venv created by running tox -r
. Here is my tox.ini:
[tox]
envlist=py34, py35
skipsdist=True
[testenv]
usedevelop=True
deps =
-rrequirements.txt
-rtest_requirements.txt
commands =
py.test []
flake8 .
- Version of Python which has Flake8 installed (e.g., python -V
) Python 3.5.2
(py35) vagrant@dev /v/optix-filters> python -V
Python 3.5.2
Note: I was seeing the same error on py27 and py34 as well.
- How you installed Flake8 (e.g., pip
, apt
, yum
, etc.) If you used pip, the version of pip installed (e.g., pip --version
)
It is listed in test_requirements.txt and for these purposes it gets installed by running tox -r
.
- Version of setuptools installed (e.g., python -c 'import setuptools; print(setuptools.__version__)'
) 28.8.0
(py35) vagrant@dev /v/optix-filters> python -c 'import setuptools; print(setuptools.__version__)'
28.8.0
- Version of Flake8 installed (i.e., copy and paste all of the output from flake8 --version
) 3.0.4
(py35) vagrant@dev /v/optix-filters> flake8 --version
3.0.4 (pycodestyle: 2.0.0, mccabe: 0.5.2, pyflakes: 1.3.0) CPython 3.5.2 on Linux
Please describe the problem or feature
If this is a bug report, please explain with examples (and example code) what you expected to happen and what actually happened.
Previously, I was using flake 2.5.4. I ran tox -r
and no flake8 errors were found.
Then I upgraded to flake 3.0.4 (bumped the version listed in my test_requirements.txt file). I ran tox -r
and suddenly there were a ton of flake8 errors, all from files within the .tox directory.
My flake8 config looked like this:
(py35) vagrant@dev /v/optix-filters> cat ~/.config/flake8
[flake8]
# Ignoring several errors for now until we can scrub our code to prevent them.
# See http://pep8.readthedocs.org/en/latest/intro.html#error-codes
# and http://flake8.readthedocs.org/en/latest/warnings.html
ignore=E121,E122,E123,E124,E126,E127,E128,E221,E241,E261,E262,E401,E501,F401,F403,F841,F999,S101,E712
exclude=*[/\]migrations[/\]*,*[/\]*_src[/\]*,*[/\]build[/\]*,*.ropeproject[/\]*,.venv[/\]*,*[/\]build[/\]*,*[/\]node_modules[/\]*,*[/\]alembic[/\]*,.virtualenv-build-packages[/\]*,.benv[/\]*
jobs=1
max-line-length = 100
I looked up the documentation and saw that .tox directories were supposed to be excluded by default. (The exclude section in http://flake8.pycqa.org/en/latest/user/options.html).
I updated my flake8 config to explicitly exclude .tox directories as well, re-ran tox -r
, and the problem went away.
(py35) vagrant@dev /v/optix-filters> cat ~/.config/flake8
[flake8]
# Ignoring several errors for now until we can scrub our code to prevent them.
# See http://pep8.readthedocs.org/en/latest/intro.html#error-codes
# and http://flake8.readthedocs.org/en/latest/warnings.html
ignore=E121,E122,E123,E124,E126,E127,E128,E221,E241,E261,E262,E401,E501,F401,F403,F841,F999,S101,E712
exclude=*[/\]migrations[/\]*,*[/\]*_src[/\]*,*[/\]build[/\]*,*.ropeproject[/\]*,.venv[/\]*,*[/\]build[/\]*,*[/\]node_modules[/\]*,*[/\]alembic[/\]*,.virtualenv-build-packages[/\]*,.benv[/\]*,.tox[/\]*
jobs=1
max-line-length = 100
Expected/desired outcome:
Either
- fix this (i.e. go back to excluding .tox)
- document the breaking change