Skip to content

Commit aff4aed

Browse files
committed
[requests] requests.exceptions.JSONDecodeError inherits from json.JSONDecodeError
1 parent 1322304 commit aff4aed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stubs/requests/requests/exceptions.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from json import JSONDecodeError as CompatJSONDecodeError
12
from typing import Any
23

34
from urllib3.exceptions import HTTPError as BaseHTTPError
@@ -13,7 +14,7 @@ class RequestException(OSError):
1314
) -> None: ...
1415

1516
class InvalidJSONError(RequestException): ...
16-
class JSONDecodeError(InvalidJSONError): ...
17+
class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError): ...
1718

1819
class HTTPError(RequestException):
1920
request: Request | PreparedRequest | Any

0 commit comments

Comments
 (0)