-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[refurb
] Implement for-loop-set-mutations
(FURB142
)
#10583
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
FURB142 | 34 | 34 | 0 | 0 | 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This looks good to me. But I want to leave it to @AlexWaygood to also take a look.
My only concern with the rule as is is its name. From reading the rule name (or even the error message), it gives me the impression that I'm not supposed to update a set "manually" (unclear what that means) at all. Maybe for-set-mutations
or for-iterable-set-mutations
My reasoning. This is a style rule that guides users towards writing more idiomatic Python.
I agree with @MichaReiser. The original name that Refurb has seems quite good to me ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall really nicely done -- seems like a useful, uncontroversial rule and the autofixes are great. Just need to work on the docs a little bit :-)
498c05f
to
05a2132
Compare
refurb
] Implement manual_set_update
(FURB142
)refurb
] Implement for-loop-set-mutations
(FURB142
)
@MichaReiser @AlexWaygood thanks for the review!
I'm fully aggree with the naming concern here, but could not invent something better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
b160eee
to
02fa99e
Compare
Summary
Implement
manual_set_update
(FURB142
) lint.see:
Test Plan
cargo test