Files not being excluded via Atom, but command line flake8 doesSee original GitHub issue
This is the
setup.cfg file. I know that the linter reads the file because
ignore is honored so there’s something going on with the
exclude. The first screenshot shows the linter raising an error in
apollo/config/settings/local.py while the second screenshot clearly shows that this file was ignored. Let me know what additional info is needed.
Using Mac OS, virtualenvwrapper
[flake8] ignore = D100, D210, D400, D413 exclude = .git, __pycache__, __init__.py, */migrations/*, apollo/config/settings/*.py, apollo/manage.py max-line-length = 99 max-complexity = 10
. ├── apollo │ ├── config │ │ ├── __init__.py │ │ ├── settings │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── local.py │ │ │ ├── production.py │ │ │ ├── settings.py │ │ │ ├── staging.py │ │ │ └── test.py │ │ ├── urls.py │ │ └── wsgi.py │ └── manage.py └── setup.cfg
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
I am looking into this.
However, in any other situation where the configuration file is not in the project’s root, Flake8 does not recognize the file.
@lucasdf Ideally these providers should be “the same as running the tool in the CLI”, unfortunately what that actually means can get really tricky. I generally follow the rules of:
- “if you are in the directory of the file and run the CLI tool, the provider should match that”
- “if you are in the project root (as seen by Atom) and run the CLI tool, the provider should match that”
Which one of those a provider falls under is just the start of the trickiness 😉.
I think this provider should follow the second one, unless this issue is describing a situation where that doesn’t match what running
flake8 in the CLI does, in which case we may need to change it?