Skip to content

Commit 2ddd420

Browse files
Allow int, bool for data argument in test.client.Client.get() (#1345)
1 parent b201f90 commit 2ddd420

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

django-stubs/test/client.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def encode_multipart(boundary: str, data: dict[str, Any]) -> bytes: ...
6060
def encode_file(boundary: str, key: str, file: Any) -> list[bytes]: ...
6161

6262
_GetDataType: TypeAlias = (
63-
Mapping[str, str | bytes | Iterable[str | bytes]] | Iterable[tuple[str, str | bytes | Iterable[str | bytes]]] | None
63+
Mapping[str, str | bytes | int | Iterable[str | bytes | int]]
64+
| Iterable[tuple[str, str | bytes | int | Iterable[str | bytes | int]]]
65+
| None
6466
)
6567

6668
class _RequestFactory(Generic[_T]):

django-stubs/utils/http.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def urlquote_plus(url: str, safe: str = ...) -> str: ...
1414
def urlunquote(quoted_url: str) -> str: ...
1515
def urlunquote_plus(quoted_url: str) -> str: ...
1616
def urlencode(
17-
query: Mapping[str, str | bytes | Iterable[str | bytes]]
18-
| Iterable[tuple[str, str | bytes | Iterable[str | bytes]]]
17+
query: Mapping[str, str | bytes | int | Iterable[str | bytes | int]]
18+
| Iterable[tuple[str, str | bytes | int | Iterable[str | bytes | int]]]
1919
| None,
2020
doseq: bool = ...,
2121
) -> str: ...

0 commit comments

Comments
 (0)