io: use ReadableBuffer for BytesIO (#8995)

This commit is contained in:
Shantanu
2022-10-27 02:42:11 -07:00
committed by GitHub
parent f66da87c84
commit 86ada9e41a

View File

@@ -103,7 +103,7 @@ class FileIO(RawIOBase, BinaryIO):
def __enter__(self: Self) -> Self: ...
class BytesIO(BufferedIOBase, BinaryIO):
def __init__(self, initial_bytes: bytes = ...) -> None: ...
def __init__(self, initial_bytes: ReadableBuffer = ...) -> None: ...
# BytesIO does not contain a "name" field. This workaround is necessary
# to allow BytesIO sub-classes to add this field, as it is defined
# as a read-only property on IO[].