Improve tuple.__add__ type (#5522)

Noticed this while browsing the stub. This feels safe but we'll see what mypy-primer has to say.
This commit is contained in:
Jelle Zijlstra
2021-05-26 13:17:30 -07:00
committed by GitHub
parent 74a8900166
commit c4da3757d7

View File

@@ -724,7 +724,7 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
@overload
def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ...
@overload
def __add__(self, x: Tuple[Any, ...]) -> Tuple[Any, ...]: ...
def __add__(self, x: Tuple[_T, ...]) -> Tuple[Union[_T_co, _T], ...]: ...
def __mul__(self, n: int) -> Tuple[_T_co, ...]: ...
def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ...
def count(self, __value: Any) -> int: ...