You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that even if the user selects true for parenthesize-tuple-in-subscript we should keep this as x[*y] (just for tuples of size one that are starred like this). It feels like the parenthesization in that case hurts readability in a way probably not intended.
…sized-tuple-in-subscript` (`RUF031`) (#16083)
The index in subscript access like `d[*y]` will not be linted or
autofixed with parentheses, even when
`lint.ruff.parenthesize-tuple-in-subscript = true`.
Closes#16077
Description
The fix for
incorrectly-parenthesized-tuple-in-subscript
(RUF031) in Ruff 0.9.6 produces a syntax error when it tries to insert parentheses around a starred expression with no comma.The correct fix would be to insert a comma along with the parentheses:
The text was updated successfully, but these errors were encountered: