Skip to content

Commit 6569dea

Browse files
authored
json: improve bytes handling (#9042)
1 parent fb61f37 commit 6569dea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/json/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def dump(
3737
**kwds: Any,
3838
) -> None: ...
3939
def loads(
40-
s: str | bytes,
40+
s: str | bytes | bytearray,
4141
*,
4242
cls: type[JSONDecoder] | None = ...,
4343
object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
@@ -58,4 +58,4 @@ def load(
5858
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
5959
**kwds: Any,
6060
) -> Any: ...
61-
def detect_encoding(b: bytes) -> str: ... # undocumented
61+
def detect_encoding(b: bytes | bytearray) -> str: ... # undocumented

0 commit comments

Comments
 (0)