Check that every noqa and type: ignore comment names a code and gives a reason
维护者通常 2 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 20/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa, tooling
调研方向
Read docs/engineering/skills/rules-registry.md and step 2.7 of the code-quality plan, then inspect rules/registry.toml and the existing rules under rules/. Build the suppression check around the listed noqa and type: ignore forms, with current violations recorded in a shrinking baseline under rules/baselines/. Done means the ratcheted rule is registered and detects missing codes or reasons; pull request #4183 is already open.
由索引模型根据 Issue 内容生成。
描述
What
Add a quality guard that fails on any inline suppression comment that doesn't name what it suppresses and say why:
- a
noqacomment, line-level or file-level (# ruff: noqa,# flake8: noqa), must list its ruff codes; - a
type: ignorecomment must list its mypy error codes in brackets; - each must be followed by a reason, as
# noqa: CODE # reasonor# type: ignore[code] # reason.
Today's comments without a reason go in a baseline file under rules/baselines/, which can only shrink.
Why
docs/engineering/skills/rules-registry.md already says every suppression gives its reason after the code, and the doc-only rule api.process.agents-suppress-as-last-resort asks agents to suppress only as a last resort. Nothing checks either. Ruff's PGH003 and PGH004 reject a suppression without a code, but nothing rejects one without a reason: 21 noqa comments, one file-level # ruff: noqa: E402 and all 10 type: ignore comments have none today.
This is the suppression check in step 2.7 of the code-quality plan, registered in rules/registry.toml as a ratcheted rule beside api.process.agents-suppress-as-last-resort.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 93
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
维护者通常 2 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
维护者通常 2 天内回复
-
Assign every v2 route and service file to a layer and enforce the doc-only v2 layer rules可能已有人在做 @anth-volk 今天认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 20/100
PolicyEngine/policyengine-api#4190 ·
维护者通常 2 天内回复
-
Check that every test function asserts something可能已有人在做 @anth-volk 于 1 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
PolicyEngine/policyengine-api#4187 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
FinanceFlash/unvibecode#509 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
FAIRmat-NFDI/nomad-distro-dev#161 ·
-
bug v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/python-sdk#3821 · 1 条评论 ·
维护者通常 1 天内回复
-
bug severity:low
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
Log-odds calibration uses upper middle score instead of median for even candidate sets可能已有人在做 @flysheep-ai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复