Describe the bug
Trailing commas are incorrectly being ruthlessly collapsed into one line
To Reproduce
Reproes in the black playground
def method(
self,
) -> typing_extensions.Literal[
"l1",
"l2",
]: pass
Result is
def method(
self,
) -> typing_extensions.Literal["l1", "l2",]:
pass
Expected behavior
I'd expect no change to the Literal writeout.
Environment
Black 22.6.0 in the black playground.
Additional context
I noticed that if we eliminate the self argument, then black works correctly. Seems to have something to do with the fact that there are two trailing command in the method definition. Second one is not respected.
Describe the bug
Trailing commas are incorrectly being ruthlessly collapsed into one line
To Reproduce
Reproes in the black playground
Result is
Expected behavior
I'd expect no change to the Literal writeout.
Environment
Black 22.6.0 in the black playground.
Additional context
I noticed that if we eliminate the
selfargument, then black works correctly. Seems to have something to do with the fact that there are two trailing command in the method definition. Second one is not respected.