Enable ruff exception rules (TRY, EM, BLE)
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
Línea de trabajo
The issue names no specific files. Start by enabling the TRY, EM and BLE rule groups in the ruff lint configuration and listing the violations they report. Each fix needs a judgment call: narrowing a broad except, moving raises out of try blocks, or keeping a Pydantic validator's exception type unchanged. Done when ruff passes with these rules on and the existing tests pass, with message text and published schemas unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Phase 1 step 1.8, group 5 of the rules workstream: enable ruff's exception rules (TRY, EM, BLE).
- Messages: build each exception message before the
raise(EM, TRY003). - Raises inside
tryblocks: move them into helpers so a handler can't catch its own raise (TRY301, TRY300). - Broad catches: decide each
except Exception(BLE001). Narrow it where the possible errors are known; otherwise keep it with an inline reason. - Exception types: use
TypeErrorfor type checks (TRY004) unless a caller, a boundary or a test depends on the current type. Never change the type raised inside a Pydantic validator, whereTypeErrorturns a validation error into a 500.
Message text and published schemas must not change.
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 33
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 23
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 PolicyEngine/policyengine-api
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
PolicyEngine/policyengine-api#3911 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
PolicyEngine/policyengine-api#3910 ·
Los mantenedores suelen responder en 2 días
-
Register weighted-microdata rules: weights aren't valuesPosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
PolicyEngine/policyengine-api#3937 ·
Los mantenedores suelen responder en 2 días
-
Remove the unused economy comparison modulePosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 3/5 Medio día Aptitud para principiantes 18/100
PolicyEngine/policyengine-api#3935 ·
Los mantenedores suelen responder en 2 días
-
Refactor tests, scripts and the rules tool, then select every ruff rule (ALL)Posiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
PolicyEngine/policyengine-api#3931 ·
Los mantenedores suelen responder en 2 días
Todos los issues de PolicyEngine/policyengine-api
Issues similares
-
customer-reported question
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Azure/azure-sdk-for-python#49548 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
btclib-org/btclib-wallet#409 ·
Los mantenedores suelen responder en 1 día
-
Phase 2 PSA Capability & Career Profile
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
fastmachinelearning/hls4ml#1582 ·
Los mantenedores suelen responder en 3 días
-
Sort modelsAbiertoenhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día