-
-
Notifications
You must be signed in to change notification settings - Fork 335
Closed
Description
In GitLab by @rossmacarthur on Feb 15, 2020, 02:58
Since --per-file-ignores
exists I think it makes sense that --per-file-selects
exists.
Example: docstrings
For example I have a project that has a package, scripts, as well as tests, and wanted to use flake8-docstrings
on just the package part. Being able to specify the following in the config would be useful:
[flake8]
ignore = D
per-file-selects =
<package-name>/*: D
Example: specific lints from plugins
Additionally, I am unable to select specific lints for the package part, without having to repeat them in the ignores for the rest of the project. Say for example I wanted just 1 lint from three different plugins X001, Y002, Z003 on the package data. It would be nice to use
[flake8]
ignore = X,Y,Z
per-file-selects =
<package-name>/*: X001,Y002,Z003
But instead I have to do something like
[flake8]
ignore = X,Y,Z
select = X001,Y002,Z003
per-file-ignores =
ci/*: X001,Y002,Z003
examples/*: X001,Y002,Z003
scripts/*: X001,Y002,Z003
tests/*: X001,Y002,Z003
StefanBrand
Metadata
Metadata
Assignees
Labels
No labels