From: Florimond Manca Date: Sat, 2 May 2020 12:29:56 +0000 (+0200) Subject: Mark `Response.json()` as returning `Any` (#923) X-Git-Tag: 0.13.0.dev1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c182e271fd8269f60d2a6511a4db287d9a26196;p=thirdparty%2Fhttpx.git Mark `Response.json()` as returning `Any` (#923) --- diff --git a/httpx/_models.py b/httpx/_models.py index ed4f984d..ffe5eaa9 100644 --- a/httpx/_models.py +++ b/httpx/_models.py @@ -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: