mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 22:11:54 +08:00
Improve *HttpResponse.getvalue() types (#422)
* Change returned type of StreamingHttpResponse.getvalue() to bytes * Add HttpResponse.getvalue() definition
This commit is contained in:
@@ -83,12 +83,13 @@ class HttpResponse(HttpResponseBase):
|
||||
context: Context
|
||||
resolver_match: ResolverMatch
|
||||
def json(self) -> Any: ...
|
||||
def getvalue(self) -> bytes: ...
|
||||
|
||||
class StreamingHttpResponse(HttpResponseBase):
|
||||
content: Any
|
||||
streaming_content: Iterator[Any]
|
||||
def __init__(self, streaming_content: Iterable[Any] = ..., *args: Any, **kwargs: Any) -> None: ...
|
||||
def getvalue(self) -> Any: ...
|
||||
def getvalue(self) -> bytes: ...
|
||||
|
||||
class FileResponse(StreamingHttpResponse):
|
||||
client: Client
|
||||
|
||||
Reference in New Issue
Block a user