Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions django-stubs/http/request.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ from django.core.files import uploadedfile, uploadhandler
from django.urls import ResolverMatch
from django.utils.datastructures import CaseInsensitiveMapping, ImmutableList, MultiValueDict
from django.utils.functional import cached_property
from typing_extensions import Self, override
from typing_extensions import Reader, Self, override

RAISE_ERROR: object
host_validation_re: Pattern[str]
Expand Down Expand Up @@ -42,7 +42,7 @@ class HttpHeaders(CaseInsensitiveMapping[str]):
@classmethod
def to_asgi_names(cls, headers: Mapping[str, Any]) -> dict[str, Any]: ...

class HttpRequest:
class HttpRequest(Reader[bytes]):
GET: _ImmutableQueryDict
POST: _ImmutableQueryDict
COOKIES: dict[str, str]
Expand Down
4 changes: 2 additions & 2 deletions django-stubs/http/response.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from typing import Any, Literal, NoReturn, TypeVar, overload, type_check_only

from django.utils.datastructures import CaseInsensitiveMapping, _PropertyDescriptor
from django.utils.functional import _StrOrPromise, cached_property
from typing_extensions import override
from typing_extensions import Writer, override

class BadHeaderError(ValueError): ...

Expand All @@ -21,7 +21,7 @@ class ResponseHeaders(CaseInsensitiveMapping[str]):
def pop(self, key: str, default: _Z = ...) -> _Z | tuple[str, str]: ...
def setdefault(self, key: str, value: str | bytes | int) -> None: ...

class HttpResponseBase:
class HttpResponseBase(Writer[str | bytes]):
status_code: int
streaming: bool
cookies: SimpleCookie
Expand Down
Loading