Skip to content

Commit 57fe1e1

Browse files
committed
add some trailing comma cases
1 parent 8c3c94f commit 57fe1e1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/data/cases/type_param_defaults.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ def simple[T=something_that_is_long](short1: int, short2: str, short3: bytes) ->
1414
def longer[something_that_is_long=something_that_is_long](something_that_is_long: something_that_is_long) -> something_that_is_long:
1515
pass
1616

17+
def trailing_comma1[T=int,](a: str):
18+
pass
19+
20+
def trailing_comma2[T=int](a: str,):
21+
pass
22+
1723
# output
1824

1925
type A[T = int] = float
@@ -41,3 +47,15 @@ def longer[
4147
something_that_is_long = something_that_is_long
4248
](something_that_is_long: something_that_is_long) -> something_that_is_long:
4349
pass
50+
51+
52+
def trailing_comma1[
53+
T = int,
54+
](a: str):
55+
pass
56+
57+
58+
def trailing_comma2[
59+
T = int
60+
](a: str,):
61+
pass

0 commit comments

Comments
 (0)