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.
$ cat >ruf031.py <<'# EOF'
x[*y]
# EOF
$ ruff --isolated check --preview --select RUF031 ruf031.py --config 'lint.ruff.parenthesize-tuple-in-subscript = true' --diff 2>&1 | grep error:
error: Fix introduced a syntax error. Reverting all changes.
The correct fix would be to insert a comma along with the parentheses: