Check that every noqa and type: ignore comment names a code and gives a reason
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- testing-qa, tooling
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 33
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 93
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/policyengine-api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
PolicyEngine/policyengine-api#4037 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
PolicyEngine/policyengine-api#3911 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PolicyEngine/policyengine-api#3910 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Assign every v2 route and service file to a layer and enforce the doc-only v2 layer rulesCó thể đã có người làm @anth-volk đã nhận 1 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
PolicyEngine/policyengine-api#4190 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Check that every test function asserts somethingCó thể đã có người làm @anth-volk đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
PolicyEngine/policyengine-api#4187 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của PolicyEngine/policyengine-api
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
jejjohnson/gaussx#752 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
521xueweihan/HelloGitHub#4270 ·
-
enhancement owner: den-haag
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ok-oldking/ok-wuthering-waves#1828 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lesson-submission pending-review
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Ikalus1988/MisakaNet#4512 ·
Maintainer thường phản hồi trong vòng 1 ngày