diff --git a/django-stubs/http/response.pyi b/django-stubs/http/response.pyi index 3c4f22b..9d76ec0 100644 --- a/django-stubs/http/response.pyi +++ b/django-stubs/http/response.pyi @@ -1,7 +1,7 @@ import datetime from io import BytesIO from json import JSONEncoder -from typing import Any, AnyStr, Dict, Iterable, Iterator, List, Optional, Tuple, Type, Union, overload +from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Type, Union, overload from django.core.handlers.wsgi import WSGIRequest from django.http.cookie import SimpleCookie @@ -12,7 +12,7 @@ from django.urls import ResolverMatch class BadHeaderError(ValueError): ... -class HttpResponseBase(Iterable[AnyStr]): +class HttpResponseBase(Iterable[Any]): status_code: int = ... cookies: SimpleCookie = ... reason_phrase: str = ... @@ -59,7 +59,7 @@ class HttpResponseBase(Iterable[AnyStr]): def seekable(self) -> bool: ... def writable(self) -> bool: ... def writelines(self, lines: Iterable[object]): ... - def __iter__(self) -> Iterator[AnyStr]: ... + def __iter__(self) -> Iterator[Any]: ... class HttpResponse(HttpResponseBase): client: Client @@ -86,10 +86,10 @@ class HttpResponse(HttpResponseBase): def json(self) -> Dict[str, Any]: ... class StreamingHttpResponse(HttpResponseBase): - content: AnyStr - streaming_content: Iterator[AnyStr] - def __init__(self, streaming_content: Iterable[AnyStr] = ..., *args: Any, **kwargs: Any) -> None: ... - def getvalue(self) -> AnyStr: ... + content: Any + streaming_content: Iterator[Any] + def __init__(self, streaming_content: Iterable[Any] = ..., *args: Any, **kwargs: Any) -> None: ... + def getvalue(self) -> Any: ... class FileResponse(StreamingHttpResponse): client: Client