-
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.
Do not add trailing commas to return type annotations using PEP 604 u…
…nions (#3735) Fix #3638: Do not add trailing commas to return type annotations using PEP 604 unions.
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
def some_very_long_name_function() -> my_module.Asdf | my_module.AnotherType | my_module.YetAnotherType | None: | ||
pass | ||
|
||
|
||
def some_very_long_name_function() -> my_module.Asdf | my_module.AnotherType | my_module.YetAnotherType | my_module.EvenMoreType | None: | ||
pass | ||
|
||
|
||
# output | ||
|
||
|
||
def some_very_long_name_function() -> ( | ||
my_module.Asdf | my_module.AnotherType | my_module.YetAnotherType | None | ||
): | ||
pass | ||
|
||
|
||
def some_very_long_name_function() -> ( | ||
my_module.Asdf | ||
| my_module.AnotherType | ||
| my_module.YetAnotherType | ||
| my_module.EvenMoreType | ||
| None | ||
): | ||
pass |