diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index f91cb674c3ca..3fe2220b46a9 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -816,7 +816,12 @@ class slice: def indices(self, __len: SupportsIndex) -> tuple[int, int, int]: ... class tuple(Sequence[_T_co], Generic[_T_co]): - def __new__(cls: type[Self], __iterable: Iterable[_T_co] = ...) -> Self: ... + # overloads are ordered this way to pass `isinstance` checks + # see: https://github.com/python/typeshed/pull/7454#issuecomment-1061490888 + @overload + def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ... + @overload + def __new__(cls) -> tuple[()]: ... def __len__(self) -> int: ... def __contains__(self, __x: object) -> bool: ... @overload