Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Having flake8 extensions install at system level will break projects and there is no way to disable them

未关闭
#488 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
tooling

调研方向

通过安装 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.

See https://gitlab.com/pycqa/flake8-docstrings/issues/10

主要语言
Python
星标
3.8k
派生
356
平均合并
3 小时 25 分钟
30 天内合并 PR
5

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PyCQA/flake8 的其他 Issue

查看 PyCQA/flake8 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。