From d12964bb4959e431de1d93b8bb51bcf20446a673 Mon Sep 17 00:00:00 2001 From: Nils Van Zuijlen Date: Wed, 25 Jan 2023 17:08:18 +0100 Subject: [PATCH] Allow int for data argument in test.client.Client.get() Fix: #1327 --- django-stubs/test/client.pyi | 4 +++- django-stubs/utils/http.pyi | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/django-stubs/test/client.pyi b/django-stubs/test/client.pyi index 3e553aa2b..678e03a97 100644 --- a/django-stubs/test/client.pyi +++ b/django-stubs/test/client.pyi @@ -60,7 +60,9 @@ def encode_multipart(boundary: str, data: dict[str, Any]) -> bytes: ... def encode_file(boundary: str, key: str, file: Any) -> list[bytes]: ... _GetDataType: TypeAlias = ( - Mapping[str, str | bytes | Iterable[str | bytes]] | Iterable[tuple[str, str | bytes | Iterable[str | bytes]]] | None + Mapping[str, str | bytes | int | Iterable[str | bytes | int]] + | Iterable[tuple[str, str | bytes | int | Iterable[str | bytes | int]]] + | None ) class _RequestFactory(Generic[_T]): diff --git a/django-stubs/utils/http.pyi b/django-stubs/utils/http.pyi index 685254511..163d04a75 100644 --- a/django-stubs/utils/http.pyi +++ b/django-stubs/utils/http.pyi @@ -14,8 +14,8 @@ def urlquote_plus(url: str, safe: str = ...) -> str: ... def urlunquote(quoted_url: str) -> str: ... def urlunquote_plus(quoted_url: str) -> str: ... def urlencode( - query: Mapping[str, str | bytes | Iterable[str | bytes]] - | Iterable[tuple[str, str | bytes | Iterable[str | bytes]]] + query: Mapping[str, str | bytes | int | Iterable[str | bytes | int]] + | Iterable[tuple[str, str | bytes | int | Iterable[str | bytes | int]]] | None, doseq: bool = ..., ) -> str: ...