update codecs.register type definition (#3271)

Closes #3262
This commit is contained in:
Parth Sharma
2019-09-27 22:36:08 +05:30
committed by Sebastian Rittau
parent d1ed2b275f
commit 4e1a45a0bb

View File

@@ -65,7 +65,7 @@ def getincrementalencoder(encoding: str) -> _IncrementalEncoder: ...
def getincrementaldecoder(encoding: str) -> _IncrementalDecoder: ...
def getreader(encoding: str) -> _StreamReader: ...
def getwriter(encoding: str) -> _StreamWriter: ...
def register(search_function: Callable[[str], CodecInfo]) -> None: ...
def register(search_function: Callable[[str], Optional[CodecInfo]]) -> None: ...
def open(filename: str, mode: str = ..., encoding: str = ..., errors: str = ..., buffering: int = ...) -> StreamReaderWriter: ...
def EncodedFile(file: IO[_Encoded], data_encoding: str, file_encoding: str = ..., errors: str = ...) -> StreamRecoder: ...
def iterencode(iterator: Iterable[_Decoded], encoding: str, errors: str = ...) -> Generator[_Encoded, None, None]: ...