Add a case where zip() can be called with no arguments (#10648)

This commit is contained in:
plokmijnuhby
2023-09-23 04:00:08 +01:00
committed by GitHub
parent 2b323bed50
commit 41bfc12065

View File

@@ -1818,6 +1818,8 @@ def vars(__object: Any = ...) -> dict[str, Any]: ...
class zip(Iterator[_T_co], Generic[_T_co]):
if sys.version_info >= (3, 10):
@overload
def __new__(cls, *, strict: bool = ...) -> zip[Any]: ...
@overload
def __new__(cls, __iter1: Iterable[_T1], *, strict: bool = ...) -> zip[tuple[_T1]]: ...
@overload
@@ -1860,6 +1862,8 @@ class zip(Iterator[_T_co], Generic[_T_co]):
strict: bool = ...,
) -> zip[tuple[Any, ...]]: ...
else:
@overload
def __new__(cls) -> zip[Any]: ...
@overload
def __new__(cls, __iter1: Iterable[_T1]) -> zip[tuple[_T1]]: ...
@overload