Tighten pyright and pytest warning config deferred from copier template adoption
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 47
- Forks
- 15
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 3
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DiamondLightSource/pythonSoftIOC
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 32/100
-
Intermittently failing testAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Add CI support and wheels for aarch64?Quizá libre de nuevo @AlexanderWells-diamond la tomó hace 1363 días y no hay ningún pull request abierto. Abiertoenhancement
DiamondLightSource/pythonSoftIOC#121 · 2 comentarios · 1 asignado ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de DiamondLightSource/pythonSoftIOC
Issues similares
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
MakazhanAlpamys/Soup#3589 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ClickHouse/clickhouse-connect#1266 ·
Los mantenedores suelen responder en 1 día
-
AutoGrowth: new time column nameAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
biosustain/growthcurves_app#89 ·
Los mantenedores suelen responder en 1 día
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
canonical/loki-k8s-operator#695 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día