Suppression comments in inactive code are reported as unused
Chưa có ai nhận issue nà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
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
Start by reproducing the report in the Pyrefly sandbox using the provided configuration and Python example. Then trace how inactive branches and # type: ignore comments are analyzed; the payload names no source files or tests, so locate the relevant test entry point. Done when the reported suppression is recognized as used and a regression test covers the example.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the Bug
# Pyrefly sandbox configuration.
# See https://pyrefly.org/en/docs/configuration/ for available configuration options.
python-version = "3.12"
[errors]
unimported-directive = 'ignore'
not-required-key-access = 'warn'
no-any-return = 'error'
unused-type-ignore = 'error'
import sys
def via_else() -> int:
if sys.version_info < (3,13):
return 0
else:
x = 1
return "x" # type: ignore
ERROR sandbox.py:8:21-35: Unused `# type: ignore` comment [[unused-type-ignore](https://pyrefly.org/en/docs/error-kinds/#unused-type-ignore)]
I don't think the "unused # type: ignore" diagnostic is right? The return 'x' is incompatible with -> int so the # type: ignore isn't in fact unused?
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
- Ngôn ngữ chính
- Rust
- Star
- 7.2k
- Fork
- 578
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 facebook/pyrefly
-
pytorch tensor-shapes typechecking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
good first issue typechecking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
cargo b warning: unused dependency `zstd`Có thể đã có người làm @Narendersingh007 đã nhận 4 ngày trước. Đang mởgood first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
pydantic
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của facebook/pyrefly
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
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 62/100
eventflux-io/eventflux#203 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
userFRM/egui-charts#4068 ·
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 82/100
trezor/trezor-firmware#8357 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
fuzz-crash review-followup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày