requests: Use the Any trick in HTTPError (#11207)

This commit is contained in:
Akuli
2023-12-30 11:28:10 +02:00
committed by GitHub
parent 3edfd9037c
commit 3ede0565d1

View File

@@ -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): ...