]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Mark `Response.json()` as returning `Any` (#923)
authorFlorimond Manca <florimond.manca@gmail.com>
Sat, 2 May 2020 12:29:56 +0000 (14:29 +0200)
committerGitHub <noreply@github.com>
Sat, 2 May 2020 12:29:56 +0000 (14:29 +0200)
httpx/_models.py

index ed4f984d262c391a59ef873e6af89fa1498c61ad..ffe5eaa9d8028c23c0fda007a79488dbdb5359f8 100644 (file)
@@ -838,7 +838,7 @@ class Response:
             message = message.format(self, error_type="Server Error")
             raise HTTPError(message, response=self)
 
-    def json(self, **kwargs: typing.Any) -> typing.Union[dict, list]:
+    def json(self, **kwargs: typing.Any) -> typing.Any:
         if self.charset_encoding is None and self.content and len(self.content) > 3:
             encoding = guess_json_utf(self.content)
             if encoding is not None: