I am using flake8
, flake8-docstrings
and many other flake8
plugins in our project
I want to disable flake8-docstrings
only for our test
folder.
I want to avoid running flake8 twice because it would mean that running flake8 wouldn't be the straight forward flake8 .
anymore. Not only that would mess with my ide settings, that would also be another excuse for the other developers in my project to not run flake8
.
Is there a way to configure flake8 to exclude specific rules just for a specific folder?
There is not currently a native option for this.
There is a proposal to add support for this in the configuration file, though no current implementation exists.
There is flake8-per-file-ignores which is a plugin that accomplishes this feature
Update: per-file-ignores
has been included in core as of flake8 3.7.x
The easiest way to use it is in the configuration file:
[flake8]
per-file-ignores =
tests/*: D101
(disclaimer: I am the current flake8 maintainer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With