Improve *HttpResponse.getvalue() types (#422)

* Change returned type of StreamingHttpResponse.getvalue() to bytes

* Add HttpResponse.getvalue() definition
This commit is contained in:
Daniel Hillier
2020-07-11 22:57:35 +10:00
committed by GitHub
parent c3cdc1c2d5
commit f16d1b8cb6

View File

@@ -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