diff --git a/stubs/requests/requests/exceptions.pyi b/stubs/requests/requests/exceptions.pyi index b642d5ad3..99c8a9edc 100644 --- a/stubs/requests/requests/exceptions.pyi +++ b/stubs/requests/requests/exceptions.pyi @@ -1,15 +1,19 @@ -from typing import Any - from urllib3.exceptions import HTTPError as BaseHTTPError +from .models import Request, Response + class RequestException(OSError): - response: Any - request: Any + response: Response | None + request: Request | None def __init__(self, *args, **kwargs) -> None: ... class InvalidJSONError(RequestException): ... class JSONDecodeError(InvalidJSONError): ... -class HTTPError(RequestException): ... + +class HTTPError(RequestException): + request: Request + response: Response + class ConnectionError(RequestException): ... class ProxyError(ConnectionError): ... class SSLError(ConnectionError): ...