diff --git a/stdlib/2.7/typing.pyi b/stdlib/2.7/typing.pyi index dc1497c6e..5e0906e0d 100644 --- a/stdlib/2.7/typing.pyi +++ b/stdlib/2.7/typing.pyi @@ -208,7 +208,7 @@ Text = unicode TYPE_CHECKING = True -class IO(Iterable[AnyStr], Generic[AnyStr]): +class IO(Iterator[AnyStr], Generic[AnyStr]): # TODO detach # TODO use abstract properties @property @@ -250,6 +250,8 @@ class IO(Iterable[AnyStr], Generic[AnyStr]): @abstractmethod def writelines(self, lines: Iterable[AnyStr]) -> None: ... + @abstractmethod + def next(self) -> AnyStr: ... @abstractmethod def __iter__(self) -> Iterator[AnyStr]: ... @abstractmethod diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index e40ff42d2..438d2648b 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -267,7 +267,7 @@ Text = str TYPE_CHECKING = True -class IO(Iterable[AnyStr], Generic[AnyStr]): +class IO(Iterator[AnyStr], Generic[AnyStr]): # TODO detach # TODO use abstract properties @property @@ -310,6 +310,8 @@ class IO(Iterable[AnyStr], Generic[AnyStr]): @abstractmethod def writelines(self, lines: Iterable[AnyStr]) -> None: ... + @abstractmethod + def __next__(self) -> AnyStr: ... @abstractmethod def __iter__(self) -> Iterator[AnyStr]: ... @abstractmethod