Skip to content

Commit c4da375

Browse files
Improve tuple.__add__ type (#5522)
Noticed this while browsing the stub. This feels safe but we'll see what mypy-primer has to say.
1 parent 74a8900 commit c4da375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/builtins.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
724724
@overload
725725
def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ...
726726
@overload
727-
def __add__(self, x: Tuple[Any, ...]) -> Tuple[Any, ...]: ...
727+
def __add__(self, x: Tuple[_T, ...]) -> Tuple[Union[_T_co, _T], ...]: ...
728728
def __mul__(self, n: int) -> Tuple[_T_co, ...]: ...
729729
def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ...
730730
def count(self, __value: Any) -> int: ...

0 commit comments

Comments
 (0)