mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-22 03:41:28 +08:00
enable test typechecking for a bunch of django test suite folders
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user