Skip to content

Commit 206bff4

Browse files
authored
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
1 parent 51267a4 commit 206bff4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

stdlib/3/typing.pyi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -515,13 +515,6 @@ class BinaryIO(IO[bytes]):
515515
# TODO readinto
516516
# TODO read1?
517517
# TODO peek?
518-
@overload
519-
@abstractmethod
520-
def write(self, s: bytearray) -> int: ...
521-
@overload
522-
@abstractmethod
523-
def write(self, s: bytes) -> int: ...
524-
525518
@abstractmethod
526519
def __enter__(self) -> BinaryIO: ...
527520

0 commit comments

Comments
 (0)