-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Labels
F: trailing commaFull of magicFull of magicR: duplicateThis issue or pull request already existsThis issue or pull request already existsT: bugSomething isn't workingSomething isn't working
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
F: trailing commaFull of magicFull of magicR: duplicateThis issue or pull request already existsThis issue or pull request already existsT: bugSomething isn't workingSomething isn't working