mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
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:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user