Skip to content

Commit f3c7c48

Browse files
authored
itertools: Improve precision of itertools.product types when called with 7 or more arguments (#11163)
1 parent c5c2c14 commit f3c7c48

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

stdlib/itertools.pyi

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,21 +220,7 @@ class product(Iterator[_T_co]):
220220
__iter6: Iterable[_T6],
221221
) -> product[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ...
222222
@overload
223-
def __new__(
224-
cls,
225-
__iter1: Iterable[Any],
226-
__iter2: Iterable[Any],
227-
__iter3: Iterable[Any],
228-
__iter4: Iterable[Any],
229-
__iter5: Iterable[Any],
230-
__iter6: Iterable[Any],
231-
__iter7: Iterable[Any],
232-
*iterables: Iterable[Any],
233-
) -> product[tuple[Any, ...]]: ...
234-
@overload
235-
def __new__(cls, *iterables: Iterable[_T1], repeat: int) -> product[tuple[_T1, ...]]: ...
236-
@overload
237-
def __new__(cls, *iterables: Iterable[Any], repeat: int = ...) -> product[tuple[Any, ...]]: ...
223+
def __new__(cls, *iterables: Iterable[_T1], repeat: int = 1) -> product[tuple[_T1, ...]]: ...
238224
def __iter__(self) -> Self: ...
239225
def __next__(self) -> _T_co: ...
240226

0 commit comments

Comments
 (0)