chore: bump ruff v0.15.1 → v0.15.12 and fix all new violations#4954
Conversation
|
Warning Review limit reached
More reviews will be available in 32 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughModernize typing and style across the repo: migrate Generator imports, simplify Generator return annotations, adopt PEP 604 unions and built-in generics, replace quoted enter returns with Self, migrate to datetime.UTC, preserve tracebacks with bare raise, switch some I/O to writelines, and align ruff/flake8/pre-commit configuration. ChangesPython 3.11+ Modernization and Linting Alignment
Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4954 +/- ##
==========================================
- Coverage 98.67% 98.65% -0.02%
==========================================
Files 25 25
Lines 2487 2456 -31
==========================================
- Hits 2454 2423 -31
Misses 33 33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/approve |
|
/retest build-container |
|
/approve |
|
Failed to build and push quay.io/openshift-cnv/openshift-virtualization-tests:latest |
What this PR does / why we need it:
Bumps ruff-pre-commit from v0.15.1 to v0.15.12 and fixes all new lint violations introduced by the version bump.
Config changes:
pyproject.toml: add N815 toextend-select(k8s camelCase field names), add SIM118/PERF102 toignore(k8s resource objects need.keys()/.items()).flake8: add N815 to ignore list.pre-commit-config.yaml: ruff v0.15.1 → v0.15.12Code fixes (36 manual + 118 auto-fixed):
UP031, UP037, SIM103, SIM113, SIM201, SIM210, PIE810, C403, C408, C409, C411, C414, TRY002, TRY201, TRY203, TRY401, DTZ003, PLC0206, PLE0704, LOG015, B008, B026
Split from #4910 for easier review.
Which issue(s) this PR fixes:
Supersedes part of #4910
Special notes for reviewer:
All pre-commit hooks and unit tests pass. 75 files changed — bulk is ruff auto-fixes (quoted type annotations, import cleanups). Manual fixes are straightforward mechanical transformations.
jira-ticket:
Assisted-by: Claude noreply@anthropic.com
Summary by CodeRabbit
Refactor
Style
Chores
Bug Fixes