flake8 ignores --config args
See original GitHub issueWith the following config
- id: flake8
args: ['--config=setup.cfg']
Any settings in setup.cfg
are never read. Adding additional settings e.g. args: ['--config=setup.cfg', '--max-line-length=500']
will set max line length to 500 but will ignore anything set in setup.cfg
.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
flake8 not picking up config file - Stack Overflow
For anyone running into this more recently: I turns out flake8 4.x no longer supports loading .config/flake8 , and seems to have no...
Read more >Full Listing of Options and Their Descriptions - Flake8
Ignore any config files and use Flake8 as if there were no config files found. Command-line example: flake8 --isolated dir/. This can not...
Read more >Ignoring Errors with Flake8 — flake8 3.1.1 documentation
By default, Flake8 has a list of error codes that it ignores. The list used by a version of Flake8 may be different...
Read more >Configuring Flake8 — flake8 6.0.0 documentation
Flake8 supports storing its configuration in your project in one of setup.cfg , tox.ini , or .flake8 . Values set at the command...
Read more >Configuration — flake8 2.5.5 documentation
If the ignore option is not in the configuration and not in the arguments, only the error codes E123/E133 , E226 and E241/E242...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It will also selectively ignore and choose some of your other settings so something more like this should work:
Ah yes I’ve found this as well.
If you have this config:
and you run
flake8 foo/bar.py
it’ll still try and lintfoo/bar.py
What we’ve been doing in our repos is not using flake8’s exclude but instead use pre-commit’s exclude: