Closed as not planned
Description
Describe the bug
Trailing commas inside indexing square brackets are not removed when running Black with -C
. This also affects generic types with multiple parameters.
To Reproduce
For example, take this code:
x = [0, 1,]
x = z[0, 1,]
and run with -C
. We get
x = [0, 1]
x = z[0, 1,]
Expected behavior
The final trailing comma should disappear.
x = z[0, 1]
Environment
- Black's version: 22.6.0. Also tested on main on the playground, and with/without
--preview
. - OS and Python version: Linux/Python 3.10.5
Activity