mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 03:41:28 +08:00
requests: Use the Any trick in HTTPError (#11207)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import Any
|
||||
|
||||
from urllib3.exceptions import HTTPError as BaseHTTPError
|
||||
|
||||
from .models import Request, Response
|
||||
@@ -12,7 +14,11 @@ class RequestException(OSError):
|
||||
|
||||
class InvalidJSONError(RequestException): ...
|
||||
class JSONDecodeError(InvalidJSONError): ...
|
||||
class HTTPError(RequestException): ...
|
||||
|
||||
class HTTPError(RequestException):
|
||||
request: Request | PreparedRequest | Any
|
||||
response: Response | Any
|
||||
|
||||
class ConnectionError(RequestException): ...
|
||||
class ProxyError(ConnectionError): ...
|
||||
class SSLError(ConnectionError): ...
|
||||
|
||||
Reference in New Issue
Block a user