diff --git a/django-stubs/http/request.pyi b/django-stubs/http/request.pyi index 6f321d1..c34de5b 100644 --- a/django-stubs/http/request.pyi +++ b/django-stubs/http/request.pyi @@ -1,6 +1,7 @@ from io import BytesIO -from typing import Any, Dict, Iterator, List, Optional, Tuple, Union +from typing import Any, Dict, Iterator, List, Optional, Tuple, Union, Callable +from django.contrib.sessions.backends.db import SessionStore from django.core.handlers.wsgi import WSGIRequest from django.utils.datastructures import MultiValueDict @@ -15,12 +16,12 @@ class HttpRequest: csrf_processing_done: bool get_host: Callable sensitive_post_parameters: str - session: django.contrib.sessions.backends.db.SessionStore - GET: Union[Dict[str, str], django.http.request.QueryDict] = ... - POST: Union[Dict[str, str], django.http.request.QueryDict] = ... + session: SessionStore + GET: Union[Dict[str, str], QueryDict] = ... + POST: Union[Dict[str, str], QueryDict] = ... COOKIES: Dict[str, str] = ... META: Dict[str, Union[int, str]] = ... - FILES: django.utils.datastructures.MultiValueDict = ... + FILES: MultiValueDict = ... path: str = ... path_info: str = ... method: Optional[str] = ... diff --git a/django-stubs/http/response.pyi b/django-stubs/http/response.pyi index 016341e..e9b2eb1 100644 --- a/django-stubs/http/response.pyi +++ b/django-stubs/http/response.pyi @@ -287,15 +287,7 @@ class JsonResponse(HttpResponse): wsgi_request: django.core.handlers.wsgi.WSGIRequest def __init__( self, - data: Union[ - Dict[str, Dict[str, str]], - Dict[str, int], - Dict[str, str], - List[int], - List[str], - str, - UUID, - ], + data: Any, encoder: Type[DjangoJSONEncoder] = ..., safe: bool = ..., json_dumps_params: Optional[Dict[str, int]] = ...,