Fix ruff lint findings deferred from copier template adoption
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 55/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 47
- Forks
- 15
- Merge médio
- 1d 23h
- PRs com merge (30d)
- 3
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de DiamondLightSource/pythonSoftIOC
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 32/100
-
Intermittently failing testAbertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 30/100
-
Add CI support and wheels for aarch64?Talvez livre de novo @AlexanderWells-diamond assumiu há 1363 dias e não há nenhum pull request aberto. Abertaenhancement
DiamondLightSource/pythonSoftIOC#121 · 2 comentários · 1 responsável ·
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
Todas as issues de DiamondLightSource/pythonSoftIOC
Issues semelhantes
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
MakazhanAlpamys/Soup#3589 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
ClickHouse/clickhouse-connect#1266 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
biosustain/growthcurves_app#89 ·
Mantenedores costumam responder em até 1 dia
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
canonical/loki-k8s-operator#695 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia