diff --git a/stdlib/2.7/__builtin__.pyi b/stdlib/2.7/__builtin__.pyi index 77706d489..17a0789d1 100644 --- a/stdlib/2.7/__builtin__.pyi +++ b/stdlib/2.7/__builtin__.pyi @@ -824,5 +824,29 @@ def cmp(x: Any, y: Any) -> int: ... def execfile(filename: str, globals: Dict[str, Any] = None, locals: Dict[str, Any] = None) -> None: ... -class file(BinaryIO): ... +class file(BinaryIO): + @overload + def __init__(self, file: str, mode: str = 'r', buffering: int = ...) -> None: ... + @overload + def __init__(self, file: unicode, mode: str = 'r', buffering: int = ...) -> None: ... + @overload + def __init__(file: int, mode: str = 'r', buffering: int = ...) -> None: ... + def __iter__(self) -> Iterator[str]: ... + def read(self, n: int = ...) -> str: ... + def __enter__(self) -> BinaryIO: ... + def __exit__(self, typ, exc, tb) -> bool: ... + def flush(self) -> None: ... + def fileno(self) -> int: ... + def isatty(self) -> bool: ... + def close(self) -> None: ... + def readable(self) -> bool: ... + def writable(self) -> bool: ... + def seekable(self) -> bool: ... + def seek(self, offset: int, whence: int = ...) -> None: ... + def tell(self) -> int: ... + def readline(self, limit: int = ...) -> str: ... + def readlines(self, hint: int = ...) -> List[str]: ... + def write(self, data: str) -> None: ... + def writelines(self, data: Iterable[str]) -> None: ... + def truncate(self, pos: int = ...) -> int: ...