mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 08:34:23 +08:00
Remove BinaryIO.write() (#4203)
write() is inherited from IO[bytes], where it's defined as `def write(self, s: AnyStr) -> int: ...`. If AnyStr is bytes, this should accept bytes, bytearray, and memoryview, so the overload is unnecessary. Closes: #4201
This commit is contained in:
@@ -515,13 +515,6 @@ class BinaryIO(IO[bytes]):
|
||||
# TODO readinto
|
||||
# TODO read1?
|
||||
# TODO peek?
|
||||
@overload
|
||||
@abstractmethod
|
||||
def write(self, s: bytearray) -> int: ...
|
||||
@overload
|
||||
@abstractmethod
|
||||
def write(self, s: bytes) -> int: ...
|
||||
|
||||
@abstractmethod
|
||||
def __enter__(self) -> BinaryIO: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user