-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f88085
commit 3f0f8f1
Showing
7 changed files
with
137 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# flags: --minimum-version=3.13 | ||
|
||
type A[T=int] = float | ||
type B[*P=int] = float | ||
type C[*Ts=int] = float | ||
type D[*Ts=*int] = float | ||
type D[something_that_is_very_very_very_long=something_that_is_very_very_very_long] = float | ||
type D[*something_that_is_very_very_very_long=*something_that_is_very_very_very_long] = float | ||
type something_that_is_long[something_that_is_long=something_that_is_long] = something_that_is_long | ||
|
||
def simple[T=something_that_is_long](short1: int, short2: str, short3: bytes) -> float: | ||
pass | ||
|
||
def longer[something_that_is_long=something_that_is_long](something_that_is_long: something_that_is_long) -> something_that_is_long: | ||
pass | ||
|
||
def trailing_comma1[T=int,](a: str): | ||
pass | ||
|
||
def trailing_comma2[T=int](a: str,): | ||
pass | ||
|
||
# output | ||
|
||
type A[T = int] = float | ||
type B[*P = int] = float | ||
type C[*Ts = int] = float | ||
type D[*Ts = *int] = float | ||
type D[ | ||
something_that_is_very_very_very_long = something_that_is_very_very_very_long | ||
] = float | ||
type D[ | ||
*something_that_is_very_very_very_long = *something_that_is_very_very_very_long | ||
] = float | ||
type something_that_is_long[ | ||
something_that_is_long = something_that_is_long | ||
] = something_that_is_long | ||
|
||
|
||
def simple[ | ||
T = something_that_is_long | ||
](short1: int, short2: str, short3: bytes) -> float: | ||
pass | ||
|
||
|
||
def longer[ | ||
something_that_is_long = something_that_is_long | ||
](something_that_is_long: something_that_is_long) -> something_that_is_long: | ||
pass | ||
|
||
|
||
def trailing_comma1[ | ||
T = int, | ||
](a: str): | ||
pass | ||
|
||
|
||
def trailing_comma2[ | ||
T = int | ||
](a: str,): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters