Repository navigation
build(ruff): align the ruff config with template-python - #431
Conversation
…ument Sort imports (I001), wrap lines over 119 columns (E501) and request the `remote` fixture through usefixtures instead of an unused parameter (ARG001), so the ruff ignores for these rules can be removed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Use the template's select order (add DOC) and ignore list, select PLR0917 explicitly (a preview rule is inactive under explicit-preview-rules) and ignore it in tests with the reason. Drop the ignores for ARG001, B007, C401, DTZ005, E402, E501, F541, FURB110, FURB122, FURB162, FURB171, I001, PERF401, PTH, PLW2901, RUF005, UP015 and UP017. Refs furedea/agent-config#74 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Review summary: no findings. The changes are mechanical: the ruff config now matches template-python, and the code fixes are import sorting, E501 line splits, and moving Blocking findings: 0. |
Do not select PLR0917 and keep the tests ignore entry as it was, until the decision on whether PLR0917 is redundant with PLR0913 is made. Refs furedea/agent-config#74 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Review summary: I found no blocking issues.
No P0–P3 findings. |
PLR0917 is stable since ruff 0.16 and adds nothing over PLR0913 at max-args = 3, because the positional count never exceeds the total count. Replace the tests-only ignore with a global one. Refs furedea/agent-config#74 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Review summary: no findings.
Note: I could not run ruff or pytest in this review environment, so I'm relying on the PR's reported results (ruff clean, 164 passed). |
概要
dotfiles の ruff 設定を template-python に揃える (Refs furedea/agent-config#74,cfg-align の dotfiles 行).
設定の変更 (
pyproject.toml)selectをテンプレートの順序にそろえ,DOCを追加 (違反 0).CPYは template-python 側でも削除済みのため入れない.ignoreをテンプレートの一覧に置換し,下表の 18 件を削除.PLR0917は tests 限定の ignore からグローバルのignoreに移動 (ユーザー判断).理由はコメントで明記.削除した ignore の元の理由
元の理由は
git log -Sで追跡.18 件はすべて 8428059 (2026-05,build(python): bootstrap uv project for hook and script tests) で,当時のスキル用スクリプトを温存するコメント付きで追加された.faa537f (#2) でスクリプトが移設されたときにコメントが落ち,de295d1 (#52) で理由なしで再追加された.保護対象のスクリプト (agents/skills/**/scripts/*.py,run_audit.pyなど) は faa537f と 83d1a89 (#98) で削除済みで,現在の Python はgithub/,herdr/,zsh/,tests/のみ.削除後,全 18 規則を有効にして全体を検査した結果,違反が出たのは I001,E501,ARG001 のみで,下記のとおり修正済み.
apply_patches.pyは削除済み.違反はテストの 1 件のみで,usefixturesに移して修正.os.walkを使うコードは存在しない (grep で 0).set(generator)を内包表記へcollect_transcripts.pyなど) は削除済み.違反 0.datetime.now()run_audit.pyは削除済み.datetime.now()の使用 0.run_audit.pyは削除済み.sys.pathを操作するコードは存在しない (grep で 0).generate_report.pyの HTML/JS テンプレートは削除済み.残りの 6 行はテスト内の fake スクリプトで,分割して修正.x if x else yをx or yへwriteをwritelinesへZの手動置換insys.pathを操作するスクリプトが無くなり,理由が消えた.15 ファイルをruff --fixで整列.appendを内包表記へos.path等をpathlibへos.pathを使うレガシースクリプトは削除済み.現在のコードはpathlibで,違反 0.openのモード指定timezone.utcをdatetime.UTCへtimezoneを import するコードは存在しない (grep で 0).max-argsに従う)PLR0917(positional args) is stable and followsmax-args, so pytest fixtures would add 83 test-only violations."元の理由がまだ成り立つ項目は無かったため,復元した ignore は無い.
コード修正 (別コミット)
ruff --fix --select I001tests/github/test_repo_cli.pyのremote)@pytest.mark.usefixtures("remote")に移し,引数から削除非自明な修正の設計上の理由:
remoteは fakeghのリモート環境を用意する副作用のためだけに要求されていたので,usefixtures に移すのが pytest の意図に沿う (未使用引数を_で隠すより正しい).確認
ruff check/ruff format --check通過,pytest164 passed,ty通過 (pre-commit)selectはテンプレートと同じ並び.ignoreはテンプレートの一覧にPLR0917(理由コメント付き) を加えたもの🤖 Generated with Claude Code