Skip to content

Commit f16d1b8

Browse files
authored
Improve *HttpResponse.getvalue() types (#422)
* Change returned type of StreamingHttpResponse.getvalue() to bytes * Add HttpResponse.getvalue() definition
1 parent c3cdc1c commit f16d1b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django-stubs/http/response.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ class HttpResponse(HttpResponseBase):
8383
context: Context
8484
resolver_match: ResolverMatch
8585
def json(self) -> Any: ...
86+
def getvalue(self) -> bytes: ...
8687

8788
class StreamingHttpResponse(HttpResponseBase):
8889
content: Any
8990
streaming_content: Iterator[Any]
9091
def __init__(self, streaming_content: Iterable[Any] = ..., *args: Any, **kwargs: Any) -> None: ...
91-
def getvalue(self) -> Any: ...
92+
def getvalue(self) -> bytes: ...
9293

9394
class FileResponse(StreamingHttpResponse):
9495
client: Client

0 commit comments

Comments
 (0)