From c056e9c0821a360bb21c158984b70711150760e1 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 30 Oct 2022 21:41:30 +0300 Subject: [PATCH] json: improve bytes handling --- stdlib/json/__init__.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/json/__init__.pyi b/stdlib/json/__init__.pyi index 2fd87622e1fe..64ab8a11a45d 100644 --- a/stdlib/json/__init__.pyi +++ b/stdlib/json/__init__.pyi @@ -37,7 +37,7 @@ def dump( **kwds: Any, ) -> None: ... def loads( - s: str | bytes, + s: str | bytes | bytearray, *, cls: type[JSONDecoder] | None = ..., object_hook: Callable[[dict[Any, Any]], Any] | None = ..., @@ -58,4 +58,4 @@ def load( object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ..., **kwds: Any, ) -> Any: ... -def detect_encoding(b: bytes) -> str: ... # undocumented +def detect_encoding(b: bytes | bytearray) -> str: ... # undocumented