Fix ruff lint findings deferred from copier template adoption
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start with [tool.ruff.lint] in pyproject.toml, then run ruff check . to see the current findings. Apply the listed safe fixes and review the manual findings in the named source and test files, checking behavior for B905, B006, B026, and E721. Done when only the permanent N and F401/F403/F405 ignores remain, ruff check . passes, and the test suite is green.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Adopting python-copier-template (PR to follow) brings in the template's ruff lint config, but to keep that PR free of code churn it adds temporary ignores. This issue tracks removing them.
Assessment (template ruff config against current master)
407 findings in total:
| Group | Count | Plan |
|---|---|---|
| F401 / F403 / F405 (star re-exports) | 182 | Keep ignored permanently, as under flake8: the public API is built from from x import * |
| N8xx / N999 (pep8-naming) | 126 | Keep ignored permanently: public API uses camelCase (aOut, longIn, SetDeviceName, ...) |
| Auto-fixable (I001 import sorting, UP015/UP004/UP034/UP010/UP041/UP006) | 55 | Mechanical ruff check --fix, ~190 changed lines across 26 files |
| Manual | ~44 | See below |
Manual findings
- SLF001 private-member access (~22 in
softioc/):autosave.py,builder.py,cothread_dispatcher.py,device_core.py,pythonSoftIoc.py,softioc.py. Mostly intentional intra-package access; decide per site between# noqa: SLF001, a per-file ignore, or a small API change. - UP031
%-formatting (16):device_core.py,fields.py, tests. - B905
zip()withoutstrict=:builder.py:120,device_core.py:76-77,tests/test_record_values.py:389. Pickstrict=Trueonly where lengths must match. - B006 mutable default argument:
softioc.py:346. - B026 star-arg after keyword:
device.py:328,331. - E721 type comparison:
builder.py:209. - B007 unused loop variable:
tests/test_records.py:248. - C4 (C408/C416/C402): one each.
(Counts from master at 4cb7ce4; findings in _version_git.py drop out if it is replaced by setuptools_scm.)
Done when
- The temporary ignores (I001, UP, SLF001, B, C4, E721) are removed from
[tool.ruff.lint]inpyproject.toml, leaving only the permanent N and F401/F403/F405 ignores. ruff check .passes and the test suite is green.- Suggested split: one commit for
ruff check --fix(safe fixes only), then separate commits for the manual groups, so behavioural ones (B905, B006, B026, E721) are easy to review.
- Ngôn ngữ chính
- Python
- Star
- 47
- Fork
- 15
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc 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 DiamondLightSource/pythonSoftIOC
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
-
Intermittently failing testĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
Add CI support and wheels for aarch64?Có thể làm lại được @AlexanderWells-diamond đã nhận 1363 ngày trước và không có pull request nào đang mở. Đang mởenhancement
DiamondLightSource/pythonSoftIOC#121 · 2 bình luận · 1 người được giao ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của DiamondLightSource/pythonSoftIOC
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
MakazhanAlpamys/Soup#3589 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ClickHouse/clickhouse-connect#1266 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AutoGrowth: new time column nameĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
biosustain/growthcurves_app#89 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
canonical/loki-k8s-operator#695 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày