Repository navigation
build(lint): enable ruff D, DOC and N - #137
Conversation
|
@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 (read-only): no findings.
🤖 Generated with Claude Code |
|
@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 blocking findings. I checked the renames ( Note: as the PR description says, CI No new tests are needed, since this PR only renames things and adds lint configuration. |
Enable pydocstyle (google convention), pydoclint and pep8-naming exactly as template-python and dotfiles do: D104, D105 and D107 ignored, D ignored under tests/**. Fix the findings in guard_file.py, shell_paths.py and shell_words.py by privatizing module-internal names and documenting the public API. Rename UnexpandableGlob, UnsupportedSyntax, UnplacedCommit and UnknownTestCommand to end in Error (N818) and update every use. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
3fe521b to
7c30403
Compare
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review summaryNo findings: no P0, P1, P2 or P3 issues. What I checked:
The changes are mechanical and don't change behavior. The existing tests already cover the renamed exceptions, so no new tests are needed. 🤖 Generated with Claude Code |
概要
ruff の D (pydocstyle, google),DOC,N (pep8-naming) を有効化する最終 PR (#74 stage 1B の持ち越し分).設定は template-python / dotfiles と同じ形にした.先行 lane (#130, #131, #132, #133) の修正は既にマージ済みで,この PR は残りの違反を直したうえで設定を有効化する.
ruff check .は有効化後の設定で 0 件.ブランチは 1 コミットで,lefthook の全フックを除外なしで通過している.Refs #74
設定 (pyproject.toml)
selectにD,DOC,NをWとFの間に追加 (template-python / dotfiles と同じ並び).DOCによる新規指摘は 0 件を確認済みignoreにD104,D105,D107を追加per-file-ignoresのtests/**にDを追加[tool.ruff.lint.pydocstyle] convention = "google"を追加既存の ignore は削除していない.
この PR での修正
改名 (N818)
ドメイン概念はそのまま,
Error接尾辞のみ追加し,agents と tests の全使用箇所を更新した.UnexpandableGlob→UnexpandableGlobErrorUnsupportedSyntax→UnsupportedSyntaxErrorUnplacedCommit→UnplacedCommitErrorUnknownTestCommand→UnknownTestCommandError非公開化 (外部から使われないことを
git grepで agents/ scripts/ tests/ に対して確認)guard_file.py_policy_path,_load_policy,_protected_reason,_validate_filename_rule,_commit_reason,_content_match,_scan_content,_judged_commit,_context,_sessionshell_paths.py_brace_wordsdocstring を書いた公開 API
guard_file.pycommit_filename_rules,content_text,mainshell_words.pyhome_directorytests/hooks/test_shell_words.pyが直接呼ぶため非公開化しなかったdocstring は名前の言い換えではなく,返す値・拒否する入力・例外を述べている.
リポジトリ全体の内訳 (ac-dn の全 lane)
#130 と #133 の件数は各 PR 本文の表,#131 は本文の合計行,#132 は ac-dn の表 (非公開化 7 +
collect,文書化main/dispatch/failure/Status/Result/Result.failed/execute) による.検証
ruff check .: All checks passedruff format --check .: 239 files already formattedty check: All checks passedpytest: 手元 (sandbox) では 2 件を除き通過.失敗はtests/hooks/test_formatter_config.pyの dprint 統合テスト 2 件のみで,sandbox がplugins.dprint.devへの通信を遮断するため (この PR の変更とは無関係).CI で確認するLEFTHOOK_EXCLUDEなしで全フック通過🤖 Generated with Claude Code