Repository navigation
fix(ci/clean-worktrees): suppress DCT002 on shutil.rmtree onerror tuple - #2814
Conversation
The `_rmtree_onerror(func, path, exc_info)` callback uses the 3-tuple signature that Python's `shutil.rmtree(onerror=...)` contract requires. Replacing it with a dataclass would break that interface, so the new DCT002 linter (from PR #2807, just merged) flags it as a false positive. Suppress with a `# noqa: DCT002` and document why. Unblocks the stop hook lint stage that started failing after PR #2807 landed. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the ChangesError handler callback documentation clarification
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Tiny follow-up to PRs #2796 + #2807 (both just merged this loop iteration).
The PlatformIO/DCT002 linter from #2807 now runs against the codebase and flags `_rmtree_onerror(func, path, exc_info)` in #2796's `ci/clean-worktrees.py` because of its 3-tuple type annotation on `exc_info`. But that signature is Python's documented `shutil.rmtree(onerror=...)` callback contract — replacing it with a dataclass would break that interface.
Suppress with a `# noqa: DCT002` and document the why so a future reader doesn't try to "fix" it.
Unblocks the stop hook lint stage that started failing after #2807 landed.
🤖 Generated with Claude Code
Summary by CodeRabbit