From 86ada9e41ab299fb627ba1f14927590f83aaa0da Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Thu, 27 Oct 2022 02:42:11 -0700 Subject: [PATCH] io: use ReadableBuffer for BytesIO (#8995) --- stdlib/io.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/io.pyi b/stdlib/io.pyi index 3e9a6cd68..2d3aadc48 100644 --- a/stdlib/io.pyi +++ b/stdlib/io.pyi @@ -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[].