def foo(
arg: ( # comment with non-return annotation
int
# comment with non-return annotation
),
):
pass
def foo(
arg: ( # comment with non-return annotation
int
| range
| memoryview
# comment with non-return annotation
),
):
pass
def foo(arg: (
int
# only after
)):
pass
Output
def foo(
# comment with non-return annotation
# comment with non-return annotation
arg: (int),
):
pass
def foo(
# comment with non-return annotation
# comment with non-return annotation
arg: (int | range | memoryview),
):
pass
def foo(
# only after
arg: (int),
):
pass
Found by going through the tests in psf/black#4453