@@ -217,12 +217,10 @@ class StreamReaderWriter(TextIO):
217
217
def readlines (self , sizehint : int | None = ...) -> list [str ]: ...
218
218
def __next__ (self ) -> str : ...
219
219
def __iter__ (self : Self ) -> Self : ...
220
- # This actually returns None, but that's incompatible with the supertype
221
- def write (self , data : str ) -> int : ...
220
+ def write (self , data : str ) -> None : ... # type: ignore[override]
222
221
def writelines (self , list : Iterable [str ]) -> None : ...
223
222
def reset (self ) -> None : ...
224
- # Same as write()
225
- def seek (self , offset : int , whence : int = ...) -> int : ...
223
+ def seek (self , offset : int , whence : int = ...) -> None : ... # type: ignore[override]
226
224
def __enter__ (self : Self ) -> Self : ...
227
225
def __exit__ (self , typ : type [BaseException ] | None , exc : BaseException | None , tb : types .TracebackType | None ) -> None : ...
228
22
8000
6
def __getattr__ (self , name : str ) -> Any : ...
@@ -253,15 +251,15 @@ class StreamRecoder(BinaryIO):
253
251
def readlines (self , sizehint : int | None = ...) -> list [bytes ]: ...
254
252
def __next__ (self ) -> bytes : ...
255
253
def __iter__ (self : Self ) -> Self : ...
256
- def write (self , data : bytes ) -> int : ...
257
- def writelines (self , list : Iterable [bytes ]) -> int : ... # type: ignore # it's supposed to return None
254
+ def write (self , data : bytes ) -> None : ... # type: ignore[override]
255
+ def writelines (self , list : Iterable [bytes ]) -> None : ...
258
256
def reset (self ) -> None : ...
259
257
def __getattr__ (self , name : str ) -> Any : ...
260
258
def __enter__ (self : Self ) -> Self : ...
261
259
def __exit__ (self , type : type [BaseException ] | None , value : BaseException | None , tb : types .TracebackType | None ) -> None : ...
260
+ def seek (self , offset : int , whence : int = ...) -> None : ... # type: ignore[override]
262
261
# These methods don't actually exist directly, but they are needed to satisfy the BinaryIO
263
262
# interface. At runtime, they are delegated through __getattr__.
264
- def seek (self , offset : int , whence : int = ...) -> int : ...
265
263
def close (self ) -> None : ...
266
264
def fileno (self ) -> int : ...
267
265
def flush (self ) -> None : ...
0 commit comments