Enable ruff exception rules (TRY, EM, BLE)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 18
- フォーク
- 33
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 18
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-api のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
PolicyEngine/policyengine-api#3911 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
PolicyEngine/policyengine-api#3910 ·
メンテナーはふだん 1 日以内に返信
-
Enable ruff security, logging and debugging rules (S, T20, LOG, G, DTZ, ERA, TD, FIX, EXE)対応中かも @anth-volk が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
PolicyEngine/policyengine-api#3914 ·
メンテナーはふだん 1 日以内に返信
-
validate_country prints "Validating country" on every request対応中かも @anth-volk が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
PolicyEngine/policyengine-api#3909 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 48/100
PolicyEngine/policyengine-api#3908 ·
メンテナーはふだん 1 日以内に返信
PolicyEngine/policyengine-api の issue をすべて見る
似ている issue
-
Agentic
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Imbad0202/academic-research-skills#979 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
reflex-dev/reflex#7561 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
prometheus-community/ansible#906 · コメント 2 件 ·