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

local-plugins relative paths are resolved relative to all paths not just the one the path directive is found

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

首先使用所示的目录树和两个 --append-config 参数重现该问题,然后跟踪 local-plugin 路径配置的处理过程。完成的标准是:./baz 仅相对于包含该路径指令的配置文件进行解析,而不是相对于每个已加载的配置路径添加。

由索引模型根据 Issue 内容生成。

描述

In GitLab by @graingert on Jul 13, 2020, 08:57

Please describe how you installed Flake8

pre-commit of course

Please provide the exact, unmodified output of flake8 --bug-report

{
  "dependencies": [],
  "platform": {
    "python_implementation": "CPython",
    "python_version": "3.8.2",
    "system": "Linux"
  },
  "plugins": [
    {
      "is_local": false,
      "plugin": "flake8-tidy-imports",
      "version": "4.1.0"
    },
    {
      "is_local": false,
      "plugin": "flake8_coding",
      "version": "1.3.2"
    },
    {
      "is_local": false,
      "plugin": "mccabe",
      "version": "0.6.1"
    },
    {
      "is_local": false,
      "plugin": "pycodestyle",
      "version": "2.6.0"
    },
    {
      "is_local": false,
      "plugin": "pyflakes",
      "version": "2.2.0"
    }
  ],
  "version": "3.8.3"
}

Please describe the problem or feature

the paths are resolved relative to all paths not just the one the path directive is found in eg:

.
└── foo
    ├── bar
    │   ├── baz
    │   └── .flake8
    ├── baz
    └── .flake8
[flake8:local-plugins]
...
paths = ./baz

when running flake8 --append-config=foo/bar/.flake8 --append-config=foo/.flake8 flake8 will add foo/baz and foo/bar/baz to LocalPlugins.paths

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

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

PyCQA/flake8 的其他 Issue

查看 PyCQA/flake8 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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