itertools: Improve precision of itertools.product types when called with 7 or more arguments (#11163)

This commit is contained in:
winestone
2024-02-17 02:03:13 +11:00
committed by GitHub
parent c5c2c14db9
commit f3c7c48438

View File

@@ -220,21 +220,7 @@ class product(Iterator[_T_co]):
__iter6: Iterable[_T6],
) -> product[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ...
@overload
def __new__(
cls,
__iter1: Iterable[Any],
__iter2: Iterable[Any],
__iter3: Iterable[Any],
__iter4: Iterable[Any],
__iter5: Iterable[Any],
__iter6: Iterable[Any],
__iter7: Iterable[Any],
*iterables: Iterable[Any],
) -> product[tuple[Any, ...]]: ...
@overload
def __new__(cls, *iterables: Iterable[_T1], repeat: int) -> product[tuple[_T1, ...]]: ...
@overload
def __new__(cls, *iterables: Iterable[Any], repeat: int = ...) -> product[tuple[Any, ...]]: ...
def __new__(cls, *iterables: Iterable[_T1], repeat: int = 1) -> product[tuple[_T1, ...]]: ...
def __iter__(self) -> Self: ...
def __next__(self) -> _T_co: ...