enable test typechecking for a bunch of django test suite folders

This commit is contained in:
Maxim Kurnikov
2019-01-30 15:56:59 +03:00
parent 978379c454
commit 628c1224d6
24 changed files with 229 additions and 141 deletions

View File

@@ -4,6 +4,7 @@
from io import BytesIO
from typing import Any, BinaryIO, Dict, Iterable, Iterator, List, Optional, overload, Pattern, Tuple, Union
from django.contrib.sessions.backends.base import SessionBase
from django.core.files import uploadhandler, uploadedfile
from django.utils.datastructures import MultiValueDict, ImmutableList
from django.urls import ResolverMatch
@@ -17,17 +18,18 @@ class RawPostDataException(Exception): ...
UploadHandlerList = Union[List[uploadhandler.FileUploadHandler], ImmutableList[uploadhandler.FileUploadHandler]]
class HttpRequest(BytesIO):
GET = ... # type: QueryDict
POST = ... # type: QueryDict
COOKIES = ... # type: Dict[str, str]
META = ... # type: Dict[str, str]
FILES = ... # type: MultiValueDict[str, uploadedfile.UploadedFile]
path = ... # type: str
path_info = ... # type: str
method = ... # type: Optional[str]
resolver_match = ... # type: ResolverMatch
content_type = ... # type: Optional[str]
content_params = ... # type: Optional[Dict[str, str]]
GET: QueryDict = ...
POST: QueryDict = ...
COOKIES: Dict[str, str] = ...
META: Dict[str, str] = ...
FILES: MultiValueDict[str, uploadedfile.UploadedFile] = ...
path: str = ...
path_info: str = ...
method: Optional[str] = ...
resolver_match: ResolverMatch = ...
content_type: Optional[str] = ...
content_params: Optional[Dict[str, str]] = ...
session: SessionBase
def __init__(self) -> None: ...
def get_host(self) -> str: ...
def get_port(self) -> str: ...