Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Enable ruff exception rules (TRY, EM, BLE)

Offen
#3,912 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

@anth-volk arbeitet bereits daran.

Seit 13.10.2026.

  • #3913 von @anth-volk — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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 try blocks: 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 TypeError for 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, where TypeError turns a validation error into a 500.

Message text and published schemas must not change.

Vorherrschende Sprache
Python
Sterne
18
Forks
33
Ø Merge
1 T. 18 Std.
Gemergte PRs (30 T.)
23

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus PolicyEngine/policyengine-api

Alle Issues in PolicyEngine/policyengine-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.