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:
Sebastian Rittau
2020-06-08 22:40:41 +02:00
committed by GitHub
parent 51267a4b12
commit 206bff44ed

View File

@@ -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: ...