diff --git a/stdlib/2/itertools.pyi b/stdlib/2/itertools.pyi index 6038a67e8..487a6e5d6 100644 --- a/stdlib/2/itertools.pyi +++ b/stdlib/2/itertools.pyi @@ -38,7 +38,7 @@ def groupby(iterable: Iterable[_T], key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ... @overload -def islice(iterable: Iterable[_T], stop: int) -> Iterator[_T]: ... +def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ... @overload def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int], step: int = ...) -> Iterator[_T]: ... diff --git a/stdlib/3/itertools.pyi b/stdlib/3/itertools.pyi index 6421163ff..51a2ab374 100644 --- a/stdlib/3/itertools.pyi +++ b/stdlib/3/itertools.pyi @@ -40,9 +40,9 @@ def groupby(iterable: Iterable[_T], key: Callable[[_T], _S]) -> Iterator[Tuple[_S, Iterator[_T]]]: ... @overload -def islice(iterable: Iterable[_T], stop: int) -> Iterator[_T]: ... +def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ... @overload -def islice(iterable: Iterable[_T], start: int, stop: Optional[int], +def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int], step: int = ...) -> Iterator[_T]: ... def starmap(func: Callable[..., _S], iterable: Iterable[Iterable[Any]]) -> Iterator[_S]: ...