glob patterns should not be overriden by specific --per-file-ignores rules
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 356
- PR merge metrics
- No merged PRs in 30d
Description
In GitLab by @qxv0 on Jan 30, 2019, 06:59
flake8 --bug-report:
{
"dependencies": [
{
"dependency": "entrypoints",
"version": "0.3"
}
],
"platform": {
"python_implementation": "CPython",
"python_version": "3.7.2",
"system": "Windows"
},
"plugins": [
{
"is_local": false,
"plugin": "ProxyChecker",
"version": "0.0.1"
},
{
"is_local": false,
"plugin": "flake8-comprehensions",
"version": "1.4.1"
},
{
"is_local": false,
"plugin": "flake8-docstrings",
"version": "1.3.0, pydocstyle: 3.0.0"
},
{
"is_local": false,
"plugin": "flake8-future-import",
"version": "0.4.5"
},
{
"is_local": false,
"plugin": "flake8-mock",
"version": "0.3"
},
{
"is_local": false,
"plugin": "flake8-no-u-prefixed-strings",
"version": "0.2"
},
{
"is_local": false,
"plugin": "flake8-print",
"version": "3.1.0"
},
{
"is_local": false,
"plugin": "flake8-string-format",
"version": "0.2.3"
},
{
"is_local": false,
"plugin": "flake8-tuple",
"version": "0.2.13"
},
{
"is_local": false,
"plugin": "flake8_coding",
"version": "1.3.1"
},
{
"is_local": false,
"plugin": "flake8_quotes",
"version": "1.0.0"
},
{
"is_local": false,
"plugin": "hacking.core",
"version": "0.0.1"
},
{
"is_local": false,
"plugin": "mccabe",
"version": "0.6.1"
},
{
"is_local": false,
"plugin": "naming",
"version": "0.8.1"
},
{
"is_local": false,
"plugin": "pycodestyle",
"version": "2.5.0"
},
{
"is_local": false,
"plugin": "pyflakes",
"version": "2.1.0"
}
],
"version": "3.7.1"
}
Say we want to ignore D102 errors in all files within the see the comments belowtests directory. We can add a rule for each file individually, but it would be more efficient if we could do that just by adding tests/* : N813 to the config file (similar to the way flake8-per-file-ignores plugin works on flake8<3.7.0).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported configuration behavior with flake8 and a glob such as tests/*, comparing it with individual per-file rules and the flake8-per-file-ignores plugin behavior. Review the issue comments for the agreed precedence, then add coverage showing that glob patterns retain their intended effect when specific --per-file-ignores rules are also present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100