Skip to content

Commit

Permalink
Remove BinaryIO.write() (#4203)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
srittau authored Jun 8, 2020
1 parent 51267a4 commit 206bff4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions stdlib/3/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...

Expand Down

0 comments on commit 206bff4

Please sign in to comment.