1 from typing import Iterable, Callable, IO, AnyStr, Generic, Any, Text, Union, Iterator, Optional
\r
6 if sys.version_info >= (3, 6):
\r
7 _Path = Union[Text, bytes, os.PathLike[Any]]
\r
9 _Path = Union[Text, bytes]
\r
13 files: Union[_Path, Iterable[_Path], None] = ...,
\r
14 inplace: bool = ...,
\r
18 openhook: Callable[[_Path, str], IO[AnyStr]] = ...) -> FileInput[AnyStr]: ...
\r
21 def close() -> None: ...
\r
22 def nextfile() -> None: ...
\r
23 def filename() -> str: ...
\r
24 def lineno() -> int: ...
\r
25 def filelineno() -> int: ...
\r
26 def fileno() -> int: ...
\r
27 def isfirstline() -> bool: ...
\r
28 def isstdin() -> bool: ...
\r
30 class FileInput(Iterable[AnyStr], Generic[AnyStr]):
\r
33 files: Union[None, _Path, Iterable[_Path]] = ...,
\r
34 inplace: bool = ...,
\r
38 openhook: Callable[[_Path, str], IO[AnyStr]] = ...
\r
41 def __del__(self) -> None: ...
\r
42 def close(self) -> None: ...
\r
43 if sys.version_info >= (3, 2):
\r
44 def __enter__(self) -> FileInput[AnyStr]: ...
\r
45 def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
\r
46 def __iter__(self) -> Iterator[AnyStr]: ...
\r
47 def __next__(self) -> AnyStr: ...
\r
48 def __getitem__(self, i: int) -> AnyStr: ...
\r
49 def nextfile(self) -> None: ...
\r
50 def readline(self) -> AnyStr: ...
\r
51 def filename(self) -> str: ...
\r
52 def lineno(self) -> int: ...
\r
53 def filelineno(self) -> int: ...
\r
54 def fileno(self) -> int: ...
\r
55 def isfirstline(self) -> bool: ...
\r
56 def isstdin(self) -> bool: ...
\r
58 def hook_compressed(filename: _Path, mode: str) -> IO[Any]: ...
\r
59 if sys.version_info >= (3, 6):
\r
60 def hook_encoded(encoding: str, errors: Optional[str] = ...) -> Callable[[_Path, str], IO[Any]]: ...
\r
62 def hook_encoded(encoding: str) -> Callable[[_Path, str], IO[Any]]: ...
\r