Is your feature request related to a problem? Please describe.
Functions with a return annotation including a dangling comma to represent an indeterminate number of elements are not properly documented. For example, def thing() -> tuple[int,] is documented as thing() -> tuple[int], misrepresenting the function as returning only a single value.
Describe the solution you'd like
It should be possible to detect this in the return annotation and document it properly.
Is your feature request related to a problem? Please describe.
Functions with a return annotation including a dangling comma to represent an indeterminate number of elements are not properly documented. For example,
def thing() -> tuple[int,]
is documented asthing() -> tuple[int]
, misrepresenting the function as returning only a single value.Describe the solution you'd like
It should be possible to detect this in the return annotation and document it properly.
Additional context
Happens for both Python 3.10 and 3.11rc1.