Having flake8 extensions install at system level will break projects and there is no way to disable them
还没有人认领这个 Issue。
评估
调研方向
通过安装 flake8-docstrings 并在一个配置写在 setup.cfg 中的项目上运行 flake8 来复现该问题。首先跟踪 flake8 如何发现插件以及读取 setup.cfg,然后定义显式插件列表或 ignore 设置应如何工作。当项目配置排除系统已安装的扩展后,它们不再改变结果,即表示完成。
由索引模型根据 Issue 内容生成。
描述
In GitLab by @ssbarnea on Apr 30, 2016, 14:27
Here is a very simple to replicate use case, just install flake8-docstrings and now run flake8 on any project that was already using it.
You will have a change of over 99% to fail passing the flake8 tests, and there is no way to disable those plugins from inside the setup.cfg.
I raise a bug month than a month ago on flake8-docstrigs regarding this issue and got no reply at all, it seems that the project not maintained at all.
Assuming that that's not an isolated case we need a way to assure that the linting settings are locked within the setup.cfg, so the final result will not depend on whichever additional modules you may have installed on your system-modules.
I know that someone with inevitably try to propose a virtual environment with --no-site-packages but please remember that those are not always possible, there are several use-cases where people are forced to import system-packages (like on continous integration systems where you cannot afford to increase the footprint of each build with 500MB just because your projects is using numpy and pandas).
Flake8 needs an option to tell it to use a specific list of plugins and to ignore others.
- 主要语言
- Python
- 星标
- 3.8k
- 派生
- 356
- 平均合并
- 3 小时 25 分钟
- 30 天内合并 PR
- 5
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PyCQA/flake8 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 76/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 42/100
-
难度 3/5 1-2 天 新手友好度 35/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
approved correction metadata
难度 1/5 1 小时以内 新手友好度 88/100
acl-org/acl-anthology#10133 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
BasedHardware/omi#20084 ·
维护者通常 1 天内回复
-
bug needs-acceptance wg/evaluation-quality
难度 2/5 1-3 小时 新手友好度 76/100
vllm-project/semantic-router#4424 ·
维护者通常 1 天内回复