Tighten pyright and pytest warning config deferred from copier template adoption
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
Start with [tool.pyright] in pyproject.toml, the existing tests/test_records.py and tests/test_autosave.py, and the type-checking tox environment. Run tox -e type-checking to see the pyright errors, then run the test suite with warnings treated as errors. Done means the chosen rules and standard mode are configured, warnings are resolved, and the suite passes on all CI platforms.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Adopting python-copier-template (PR to follow) adds pyright and the template's pytest config, but to keep that PR free of code changes both are configured leniently. This issue tracks tightening them. The ruff equivalent is #214.
Pyright
The adoption PR runs pyright in basic mode (the template uses standard) with these rules turned off in [tool.pyright] in pyproject.toml:
reportArgumentTypereportAssignmentTypereportAttributeAccessIssuereportOperatorIssuereportOptionalCallreportOptionalMemberAccessreportOptionalSubscriptreportUndefinedVariable(names fromfrom x import *; may need to stay off, or be fixed with explicit__all__/imports)reportUnusedExpressionreportWildcardImportFromLibrary
With those rules on, the current code gives about 155 errors in basic mode and 178 in standard mode. softioc/iocStats (third-party submodule) stays excluded.
pytest warnings
The template sets filterwarnings = "error"; the adoption PR leaves it out because some tests raise warnings, e.g. files left open (ResourceWarning) in tests/test_records.py and tests/test_autosave.py.
Done when
- The disabled pyright rules are re-enabled (or kept off with a stated reason, e.g. star imports) and
tox -e type-checkingpasses. -
typeCheckingModeisstandard, matching the template. - The tests close their files,
filterwarnings = "error"is set, and the suite passes on all CI platforms.
- 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 55/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