Skip to content

Commit

Permalink
Remove BinaryIO.write()
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: python#4201
  • Loading branch information
srittau committed Jun 8, 2020
1 parent df6136c commit 3933b61
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 3933b61

Please sign in to comment.