Skip to content

Commit

Permalink
requests: type RequestException members (not Any) (#8989)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Waygood <[email protected]>
  • Loading branch information
ErikBjare and AlexWaygood committed Sep 20, 2023
1 parent 7ead6df commit ddebb83
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions stubs/requests/requests/exceptions.pyi
Original file line number Diff line number Diff line change
@@ -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): ...
Expand Down

0 comments on commit ddebb83

Please sign in to comment.