Skip to content

Commit 2ca801e

Browse files
furedea-agent[bot]furedeaclaude
authored
build(ruff): enforce standard logging with extra (#27)
## 概要 ruff の設定で G004 の ignore を外し,LOG015 と TRY400 を select に追加しました. ## ルール | ルール | 内容 | 変更 | preview | | --- | --- | --- | --- | | G004 | logging 呼び出しでの f-string 禁止 | ignore から削除 | いいえ(stable) | | LOG015 | root logger の直接呼び出し禁止 | select に追加(既存の `LOG` プレフィックスでも対象) | いいえ(stable,0.10.0〜) | | TRY400 | 例外処理内の `logger.error` は `logger.exception` を使う | select に追加 | いいえ(stable) | ピン留めの ruff 0.15.11 で確認した結果,preview ルールはありません.そのため `explicit-preview-rules = true` に必要なフルIDの扱いは不要です. テンプレートに対して `ruff check` を実行し,違反は 0 件でした.コードの修正はありません. ## 理由 logging は標準モジュールを使い、変数は f-string ではなく `extra` で渡す方針にするためです. Refs furedea/agent-config#74 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: furedea <132188853+furedea@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 7d8b3fb commit 2ca801e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎pyproject.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,15 @@ select = [
104104
"INP",
105105
"C901",
106106
"PLR1702",
107+
"LOG015",
108+
"TRY400",
107109
# preview rules: explicit-preview-rules = true needs the full rule IDs
108110
"DOC201",
109111
"DOC402",
110112
"DOC501",
111113
"UP042",
112114
]
113115
ignore = [
114-
"G004",
115116
"PLC1901",
116117
"PLR2004",
117118
# PLR0917: PLR0913 (max-args = 3) already caps the total, which bounds the positional count

0 commit comments

Comments
 (0)