chore: enable safe Ruff autofix rules#5774
Conversation
Enable eight Ruff rules whose existing diagnostics are fixed safely by Ruff v0.15.18.\n\nDo not include the resulting source edits in this commit: pre-commit.ci should apply and commit them on the pull request.\n\nAuthored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.6-terra)
for more information, see https://pre-commit.ci
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis PR applies mechanical Python and Triton syntax simplifications, makes selected attribute-assignment exits explicit, updates NVNMD descriptor range initialization, expands Ruff lint rules, and cleans up test fixtures, helpers, comments, and equivalent loop forms. ChangesRuntime consistency and syntax cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #5774 +/- ##
==========================================
- Coverage 79.69% 79.56% -0.14%
==========================================
Files 1020 1020
Lines 116359 116357 -2
Branches 4303 4305 +2
==========================================
- Hits 92736 92581 -155
- Misses 22076 22226 +150
- Partials 1547 1550 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Enable eight Ruff rules that have safe, automatic fixes in the repository's pinned Ruff v0.15.18:
PIE808,PT022,RET502,SIM910,TD006PLR1711,PLR1733,PLR2044Intentional follow-up
This PR deliberately changes only
pyproject.toml; it does not include the 128 existing code fixes. The configured pre-commit.ci autofix should apply those fixes to this PR, which provides an end-to-end confirmation that the automated repair is clean.COM812is intentionally excluded becauseruff-formatis already enabled and Ruff recommends against combining the formatter with this trailing-comma rule. Rules whose fixes are classified as unsafe in Ruff v0.15.18 are also excluded.Validation
git diff --checkruff v0.15.18 check --output-format json .reports exactly 128 intentional diagnostics from the eight newly enabled rules; no--fixwas run.Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.6-terra)
Summary by CodeRabbit
Bug Fixes
Refactor
Chores