Repository navigation
[ruff] Support slices in RUF005 - #17078
Conversation
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| RUF005 | 22 | 22 | 0 | 0 | 0 |
|
Thank you. I think we should gate this change behind preview as it significantly expands the rule's scope (as demonstrated by the ecosystem results). Did you review the results from the ecosystem check? @ntBre do you want to review this change? |
|
@MichaReiser Sure, added a second commit to gate it as To my eye, the ecosystem changes look alright. |
|
@MichaReiser will do! @akx we squash and merge through GitHub, so no worries about squashing manually! |
ntBre
left a comment
There was a problem hiding this comment.
Thanks! I had one request about the test placement, but this otherwise looks good to me.
Summary
Teaches
RUF005to also consider slices for concatenation. Other indexing (foo[0] + [7, 8, 9] + bar[1]) is explicitly not considered.Test Plan
Manually tested (diff above from
ruff check --diff), snapshot updated.