mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 04:25:50 +08:00
[requests] Add requests.compat.JSONDecodeError (#15545)
Also add a comment that `JSONDecodeError` may be imported from `simplejson` if that is installed.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
from builtins import bytes as bytes, str as str
|
||||
from collections import OrderedDict as OrderedDict
|
||||
|
||||
# If simplejson is installed, JSONDecodeError is actually imported from there.
|
||||
from json import JSONDecodeError as JSONDecodeError
|
||||
from typing import Literal
|
||||
from typing_extensions import TypeAlias
|
||||
from urllib.parse import (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from json import JSONDecodeError as CompatJSONDecodeError
|
||||
from typing import Any
|
||||
|
||||
from urllib3.exceptions import HTTPError as BaseHTTPError
|
||||
|
||||
from .compat import JSONDecodeError as CompatJSONDecodeError
|
||||
from .models import Request, Response
|
||||
from .sessions import PreparedRequest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user