[refurb] Implement for-loop-set-mutations (FURB142)#10583
[refurb] Implement for-loop-set-mutations (FURB142)#10583MichaReiser merged 3 commits intoastral-sh:mainfrom
refurb] Implement for-loop-set-mutations (FURB142)#10583Conversation
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| FURB142 | 34 | 34 | 0 | 0 | 0 |
MichaReiser
left a comment
There was a problem hiding this comment.
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 ( |
AlexWaygood
left a comment
There was a problem hiding this comment.
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. |
b160eee to
02fa99e
Compare
Summary
Implement
manual_set_update(FURB142) lint.see:
Test Plan
cargo test