From 7dbc8748dc43e82a4c999061912d83e6064938d8 Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Tue, 18 Sep 2018 04:46:16 -0700 Subject: [PATCH] Add __iter__ method to codecs.StreamReader. (#2463) --- stdlib/2and3/codecs.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/2and3/codecs.pyi b/stdlib/2and3/codecs.pyi index 3a28a2958..35be5a947 100644 --- a/stdlib/2and3/codecs.pyi +++ b/stdlib/2and3/codecs.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any, BinaryIO, Callable, Generator, IO, Iterable, List, Optional, Protocol, Text, TextIO, Tuple, Type, TypeVar, Union +from typing import Any, BinaryIO, Callable, Generator, IO, Iterable, Iterator, List, Optional, Protocol, Text, TextIO, Tuple, Type, TypeVar, Union from abc import abstractmethod import types @@ -156,6 +156,7 @@ class StreamReader(Codec): def __exit__( self, typ: Optional[Type[BaseException]], exc: Optional[BaseException], tb: Optional[types.TracebackType] ) -> None: ... + def __iter__(self) -> Iterator[_Decoded]: ... def __getattr__(self, name: str) -> Any: ... _T = TypeVar("_T", bound=StreamReaderWriter)