[flake8-simplify] Implement SIM911#9460
[flake8-simplify] Implement SIM911#9460charliermarsh merged 6 commits intoastral-sh:mainfrom trag1c:simplify-SIM911
flake8-simplify] Implement SIM911#9460Conversation
|
charliermarsh
left a comment
There was a problem hiding this comment.
Awesome, excited to review!
if checker.settings.preview.is_disabled() {
return;
}Ah yeah -- this shouldn't be required for rules that are in |
|
Thanks, corrected it. Double-checked my findings and it turns out that what I saw was actually a stable rule that had the preview check. I'm assuming that's still redundant? |
crates/ruff_linter/src/rules/flake8_simplify/rules/zip_dict_keys_and_values.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/flake8_simplify/rules/zip_dict_keys_and_values.rs
Outdated
Show resolved
Hide resolved
charliermarsh
left a comment
There was a problem hiding this comment.
Looks great! Only minor feedback.
Yeah, which rule is this? |
I checked to find the rule code only to realize it's just ONE OF the functions that has the preview check in which case it's probably fine 🤦♂️ forgive my silliness |
|
@trag1c - I'm happy to include this in today's release. Do you wanna do the follow-up feedback otherwise I can do it quickly (no bother either way)? |
|
Sure, let's get that released today! 😄 |
CodSpeed Performance ReportMerging #9460 will degrade performances by 4.35%Comparing Summary
Benchmarks breakdown
|
|
@trag1c - think it just needs to be updated against |
Head branch was pushed to by a user without write access
|
My brain ignored "just pushed" and decided to update it myself either way 🤦♂️ |
|
(This doesn't touch the parser at all so it must be noise.) |
Summary
Closes #9319, implements the
SIM911rule fromflake8-simplify.Note
I wasn't sure whether or not to include
at the beginning of the function with violation logic if the rule's already declared as part of
RuleGroup::Preview.I've seen both variants, so I'd appreciate some feedback on that :)