Skip to content

Commit 5691f59

Browse files
authored
Update JsonType containers to read-based collections (#7436)
1 parent 2144213 commit 5691f59

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/requests/_types.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from __future__ import annotations
1111

12-
from collections.abc import Callable, Iterable, Mapping, MutableMapping
12+
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
1313
from typing import (
1414
TYPE_CHECKING,
1515
Any,
@@ -139,7 +139,13 @@ class _ValidatedRequest(PreparedRequest):
139139
VerifyType: TypeAlias = bool | str
140140
CertType: TypeAlias = str | tuple[str, str] | None
141141
JsonType: TypeAlias = (
142-
None | bool | int | float | str | list["JsonType"] | dict[str, "JsonType"]
142+
None
143+
| bool
144+
| int
145+
| float
146+
| str
147+
| Sequence["JsonType"]
148+
| Mapping[str, "JsonType"]
143149
)
144150

145151
# TypedDicts for Unpack kwargs (PEP 692)

0 commit comments

Comments
 (0)