Add IOBase.read() and write() (#4912)

These methods are required on IOBase-derived classes, even if they
are not a formal part of the protocol. For more information, see
https://docs.python.org/3/library/io.html#io.IOBase.

Closes: #4906

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
baterflyrity
2021-01-08 14:19:46 +03:00
committed by GitHub
parent 8cad322a8c
commit 1d9da4ed33

View File

@@ -34,12 +34,14 @@ class IOBase:
def flush(self) -> None: ...
def isatty(self) -> bool: ...
def readable(self) -> bool: ...
read: Callable[..., Any]
def readlines(self, __hint: int = ...) -> List[bytes]: ...
def seek(self, __offset: int, __whence: int = ...) -> int: ...
def seekable(self) -> bool: ...
def tell(self) -> int: ...
def truncate(self, __size: Optional[int] = ...) -> int: ...
def writable(self) -> bool: ...
write: Callable[..., Any]
def writelines(self, __lines: Iterable[ReadableBuffer]) -> None: ...
def readline(self, __size: Optional[int] = ...) -> bytes: ...
def __del__(self) -> None: ...