more cleanups: http

This commit is contained in:
Maxim Kurnikov
2018-08-14 13:25:23 +03:00
parent 23d431b5c5
commit 2b7b31a25e
2 changed files with 7 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
from io import BytesIO 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.core.handlers.wsgi import WSGIRequest
from django.utils.datastructures import MultiValueDict from django.utils.datastructures import MultiValueDict
@@ -15,12 +16,12 @@ class HttpRequest:
csrf_processing_done: bool csrf_processing_done: bool
get_host: Callable get_host: Callable
sensitive_post_parameters: str sensitive_post_parameters: str
session: django.contrib.sessions.backends.db.SessionStore session: SessionStore
GET: Union[Dict[str, str], django.http.request.QueryDict] = ... GET: Union[Dict[str, str], QueryDict] = ...
POST: Union[Dict[str, str], django.http.request.QueryDict] = ... POST: Union[Dict[str, str], QueryDict] = ...
COOKIES: Dict[str, str] = ... COOKIES: Dict[str, str] = ...
META: Dict[str, Union[int, str]] = ... META: Dict[str, Union[int, str]] = ...
FILES: django.utils.datastructures.MultiValueDict = ... FILES: MultiValueDict = ...
path: str = ... path: str = ...
path_info: str = ... path_info: str = ...
method: Optional[str] = ... method: Optional[str] = ...

View File

@@ -287,15 +287,7 @@ class JsonResponse(HttpResponse):
wsgi_request: django.core.handlers.wsgi.WSGIRequest wsgi_request: django.core.handlers.wsgi.WSGIRequest
def __init__( def __init__(
self, self,
data: Union[ data: Any,
Dict[str, Dict[str, str]],
Dict[str, int],
Dict[str, str],
List[int],
List[str],
str,
UUID,
],
encoder: Type[DjangoJSONEncoder] = ..., encoder: Type[DjangoJSONEncoder] = ...,
safe: bool = ..., safe: bool = ...,
json_dumps_params: Optional[Dict[str, int]] = ..., json_dumps_params: Optional[Dict[str, int]] = ...,