@@ -2,7 +2,7 @@ import builtins
22import codecs
33import sys
44from _typeshed import FileDescriptorOrPath , MaybeNone , ReadableBuffer , WriteableBuffer
5- from collections .abc import Callable , Iterable , Iterator
5+ from collections .abc import Iterable , Iterator
66from io import BufferedIOBase , RawIOBase , TextIOBase , UnsupportedOperation as UnsupportedOperation
77from os import _Opener
88from types import TracebackType
@@ -36,14 +36,16 @@ if sys.version_info >= (3, 12):
3636 def flush (self ) -> None : ...
3737 def isatty (self ) -> bool : ...
3838 def readable (self ) -> bool : ...
39- read : Callable [..., Any ]
39+ # Abstract method that doesn't exist at runtime, the exact return type depends on the sub-class
40+ def read (self , size : int = ..., / ) -> Any : ...
4041 def readlines (self , hint : int = - 1 , / ) -> list [bytes ]: ...
4142 def seek (self , offset : int , whence : int = 0 , / ) -> int : ...
4243 def seekable (self ) -> bool : ...
4344 def tell (self ) -> int : ...
4445 def truncate (self , size : int | None = None , / ) -> int : ...
4546 def writable (self ) -> bool : ...
46- write : Callable [..., Any ]
47+ # Abstract method that doesn't exist at runtime, the exact arguments and return type depend on the sub-class
48+ def write (self , s : Any , / ) -> Any : ...
4749 def writelines (self , lines : Iterable [ReadableBuffer ], / ) -> None : ...
4850 def readline (self , size : int | None = - 1 , / ) -> bytes : ...
4951 def __del__ (self ) -> None : ...
@@ -64,14 +66,16 @@ else:
6466 def flush (self ) -> None : ...
6567 def isatty (self ) -> bool : ...
6668 def readable (self ) -> bool : ...
67- read : Callable [..., Any ]
69+ # Abstract method that doesn't exist at runtime, the exact arguments and return type depend on the sub-class
70+ def read (self ) -> Any : ...
6871 def readlines (self , hint : int = - 1 , / ) -> list [bytes ]: ...
6972 def seek (self , offset : int , whence : int = 0 , / ) -> int : ...
7073 def seekable (self ) -> bool : ...
7174 def tell (self ) -> int : ...
7275 def truncate (self , size : int | None = None , / ) -> int : ...
7376 def writable (self ) -> bool : ...
74- write : Callable [..., Any ]
77+ # Abstract method that doesn't exist at runtime, the exact arguments and return type depend on the sub-class
78+ def write (self , s : Any , / ) -> Any : ...
7579 def writelines (self , lines : Iterable [ReadableBuffer ], / ) -> None : ...
7680 def readline (self , size : int | None = - 1 , / ) -> bytes : ...
7781 def __del__ (self ) -> None : ...
0 commit comments