Fix ruff lint findings deferred from copier template adoption
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 47
- Forks
- 15
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 3
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DiamondLightSource/pythonSoftIOC
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 32/100
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
-
Add CI support and wheels for aarch64?Evtl. wieder frei @AlexanderWells-diamond hat das vor 1363 Tagen übernommen, und es ist kein Pull Request offen. Offenenhancement
DiamondLightSource/pythonSoftIOC#121 · 2 Kommentare · 1 zugewiesene Person ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
Alle Issues in DiamondLightSource/pythonSoftIOC
Ähnliche Issues
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
MakazhanAlpamys/Soup#3589 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
ClickHouse/clickhouse-connect#1266 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
biosustain/growthcurves_app#89 ·
Maintainer antworten meist innerhalb von 1 Tag
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
canonical/loki-k8s-operator#695 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag