The latest release, 22.3.0, issue #2918, PR #2942, has broken formatting for function definition and call. In previous versions of Black the following:
def intentional_comma(a: int, b: int, c: int,) -> int:
return a + b + c
def intentional_comma(a: int, b: int, c: int,):
return a + b + c
intentional_comma(a=10, b=20, c=30,)
Would be formatted to:
def intentional_comma(
a: int,
b: int,
c: int,
) -> int:
return a + b + c
def intentional_comma(
a: int,
b: int,
c: int,
):
return a + b + c
intentional_comma(
a=10,
b=20,
c=30,
)
But the new versioning breaks this, and the above is now formatted as:
def intentional_comma(a: int, b: int, c: int,) -> int:
return a + b + c
def intentional_comma(
a: int, b: int, c: int,
):
return a + b + c
intentional_comma(
a=10, b=20, c=30,
)
The latest release, 22.3.0, issue #2918, PR #2942, has broken formatting for function definition and call. In previous versions of Black the following:
Would be formatted to:
But the new versioning breaks this, and the above is now formatted as: