From 871ebbf566d6ffe22446437501bc75a6860ea9d6 Mon Sep 17 00:00:00 2001 From: Julien Hebert Date: Mon, 21 Mar 2016 10:58:00 +0100 Subject: [PATCH] io anystr --- stdlib/3/fileinput.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stdlib/3/fileinput.pyi b/stdlib/3/fileinput.pyi index 04d8da79b..68ec815b7 100644 --- a/stdlib/3/fileinput.pyi +++ b/stdlib/3/fileinput.pyi @@ -1,4 +1,4 @@ -from typing import Iterable, BinaryIO, List, Callable +from typing import Iterable, BinaryIO, List, Callable, IO def input( @@ -7,7 +7,7 @@ def input( backup: str=..., bufsize: int=..., mode: str=..., - openhook: Callable[[str, str], BinaryIO]=... + openhook: Callable[[str, str], IO[AnyStr]]=... ): ... @@ -26,7 +26,7 @@ class FileInput(Iterable): backup: str=..., bufsize: int=..., mode: str=..., - openhook: Callable[[str, str], BinaryIO]=... + openhook: Callable[[str, str], IO[AnyStr]]=... ) -> None: ... def __del__(self) -> None: ... @@ -45,5 +45,5 @@ class FileInput(Iterable): def isfirstline(self) -> bool: ... def isstdin(self) -> bool: ... -def hook_compressed(filename: str, mode: str) -> BinaryIO: ... -def hook_encoded(encoding: str) -> BinaryIO: ... +def hook_compressed(filename: str, mode: str) -> IO[AnyStr]: ... +def hook_encoded(encoding: str) -> IO[AnyStr]: ...