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
If a function has a trailing comma in the argument list, black does not remove it.
Start from:
defone(
a,
):
passdeftwo(
a,
b,
):
pass
Run black over that file, and you get:
defone(a,):
passdeftwo(
a, b,
):
pass
I would expect something more like:
defone(a):
passdeftwo(a, b):
pass
Environment:
Version: I can reproduce this in release and master builds; 19.10b0 and 19.10b1.dev16+g1ab87a3
OS and Python version: macOS, Python 3.7.5
Does this bug also happen on master? Yes.
Additional context
Possibly related issues:
Trailing comma for function with one arg #880 Trailing comma for function with one arg, which is where I took the minimal example from. Unlike that issue, this seems to affect functions with more than one argument.
If a function has a trailing comma in the argument list, black does not remove it.
Start from:
Run black over that file, and you get:
I would expect something more like:
Environment:
Does this bug also happen on master? Yes.
Additional context
Possibly related issues:
two(a, b)
into a single line.I had a look for duplicates in the trailing-comma label, couldn't find any.
The text was updated successfully, but these errors were encountered: