Skip to content

Commit

Permalink
Allow int for data argument in test.client.Client.get()
Browse files Browse the repository at this point in the history
Fix: #1327
  • Loading branch information
nils-van-zuijlen committed Jan 26, 2023
1 parent e6d65d2 commit d12964b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion django-stubs/test/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/utils/http.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down

0 comments on commit d12964b

Please sign in to comment.