mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
fileinput first version
This commit is contained in:
49
stdlib/3/fileinput.pyi
Normal file
49
stdlib/3/fileinput.pyi
Normal file
@@ -0,0 +1,49 @@
|
||||
from typing import Iterable, BinaryIO
|
||||
|
||||
__all__ = ... # type: List[str]
|
||||
_state = ... # type: None
|
||||
|
||||
def input(
|
||||
files = None,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
bufsize: int = ...,
|
||||
mode: str = ...,
|
||||
openhook = None): ...
|
||||
|
||||
def close() -> None : ...
|
||||
def nextfile() -> None : ...
|
||||
def filename() -> str : ...
|
||||
def lineno() -> int : ...
|
||||
def isfirstline() -> bool : ...
|
||||
def isstdin() -> bool : ...
|
||||
|
||||
class FileInput(Iterable):
|
||||
def __init__(
|
||||
self,
|
||||
files = None,
|
||||
inplace: bool = ...,
|
||||
backup: str = ...,
|
||||
bufsize: int = ...,
|
||||
mode: str = ...,
|
||||
openhook = None) -> None : ...
|
||||
|
||||
|
||||
def __del__(self) -> None : ...
|
||||
def close(self) -> None : ...
|
||||
def __enter__(self) : ... #return self
|
||||
def __exit__(self, type, value, traceback) -> None : ...
|
||||
def __iter__(self) : ... #return self
|
||||
def __next__(self) -> str : ... #return readline()
|
||||
def __getitem__(self, i) -> str : ... #return next()
|
||||
def nextfile(self) -> None : ...
|
||||
def readline(self) -> str : ...
|
||||
def filename(self) -> str : ...
|
||||
def lineno(self) -> int : ...
|
||||
def filelineno(self) -> int : ...
|
||||
def fileno(self) -> int : ...
|
||||
def isfirstline(self) -> bool : ...
|
||||
def isstdin(self) -> bool : ...
|
||||
|
||||
def hook_compressed(filename: str, mode: str) -> BinaryIO : ...
|
||||
def hook_encoded(encoding: str) -> BinaryIO : ...
|
||||
Reference in New Issue
Block a user