Add C4 linting rules - #7543
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: QUIET Plan: Pro Plus Run ID: 📒 Files selected for processing (35)
📝 WalkthroughWalkthroughThe pull request adds the ChangesPython syntax modernization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7543 +/- ##
==========================================
- Coverage 80.68% 80.67% -0.00%
==========================================
Files 581 581
Lines 47068 47068
==========================================
- Hits 37971 37967 -4
- Misses 9097 9101 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Most of the pyupgrade rules should be part of ruff, I don't think it's worth it adding an extra linter. Perhaps this could be a one-off PR without adding the hook? It's possible that some of the changes in this PR are not in the |
0914049 to
358f70b
Compare
|
Right thanks, we already have UP. It seems ruff also does it smarter than pyupgrade and excludes certain rules that might introduce performance issues UP038). |
358f70b to
2a1bbf8
Compare
9795bce to
004c65f
Compare
danielhollas
left a comment
There was a problem hiding this comment.
C4 rules are enabled by default in ruff 0.16 so it's fine to enable them here, thanks!
004c65f to
b4818fa
Compare
These rules avoid creation on unnecessary generators.
b4818fa to
6969515
Compare
|
I separated in two commits, so one easier review the manual fixes in the second commit |
I am not sure why these things have not been upgraded yet in the last time we ran pyupgrade but it made me conclude that we should just add it in hook since part of it is just formatting style choice that can be broken in future commits.