Fix ruff lint findings deferred from copier template adoption
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 55/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 47
- Forks
- 15
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 3
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de DiamondLightSource/pythonSoftIOC
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 32/100
-
Intermittently failing testOuvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
-
Add CI support and wheels for aarch64?Peut-être à nouveau libre @AlexanderWells-diamond l’a pris il y a 1363 jours, et aucune pull request n’est ouverte. Ouverteenhancement
DiamondLightSource/pythonSoftIOC#121 · 2 commentaires · 1 personne assignée ·
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
Toutes les issues de DiamondLightSource/pythonSoftIOC
Issues similaires
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
MakazhanAlpamys/Soup#3589 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
ClickHouse/clickhouse-connect#1266 ·
Les mainteneurs répondent en général sous 1 jour
-
AutoGrowth: new time column nameOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
biosustain/growthcurves_app#89 ·
Les mainteneurs répondent en général sous 1 jour
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
canonical/loki-k8s-operator#695 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour