glob patterns should not be overriden by specific --per-file-ignores rules
还没有人认领这个 Issue。
评估
调研方向
首先,使用 flake8 和类似 tests/* 的 glob 重现所报告的配置行为,并将其与针对单个文件的规则以及 flake8-per-file-ignores plugin 的行为进行比较。查看 issue 评论以确认约定的优先级,然后添加测试覆盖,说明在同时存在特定的 --per-file-ignores 规则时,glob 模式仍能保持其预期效果。
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- Python
- 星标
- 3.8k
- 派生
- 362
- 平均合并
- 6 小时 14 分钟
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PyCQA/flake8 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
-
Max Line Length in style guide ignored with python 3.14 when checking multiple files可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 42/100
-
option_manager.add_option ignores action when reading from config可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
相似的 Issue
-
component:benchmark
难度 2/5 1-3 小时 新手友好度 76/100
agentic-os-org/ANOLISA#9177 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
distrochooser/distrochooser#520 ·
维护者通常 2 天内回复
-
Status: Needs confirmation Status: Needs triage
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
[BUG] Published Docker images lack the redis extra: HEADROOM_COMPRESS_SESSION_STORE stops startup可能已有人在做 @AlessandroSpallina 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
headroomlabs-ai/headroom#4513 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
codespell-project/codespell#4060 ·
维护者通常 1 天内回复