mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
[requests] Allow HTTPError.response to be None (#10875)
This aligns with the definition in requests, but means that user code might need additional assertions to ensure that `HTTPError.response` is not `None`.
This commit is contained in:
@@ -12,12 +12,7 @@ class RequestException(OSError):
|
||||
|
||||
class InvalidJSONError(RequestException): ...
|
||||
class JSONDecodeError(InvalidJSONError): ...
|
||||
|
||||
class HTTPError(RequestException):
|
||||
request: Request | PreparedRequest | None
|
||||
response: Response
|
||||
def __init__(self, *args: object, request: Request | PreparedRequest | None = ..., response: Response) -> None: ...
|
||||
|
||||
class HTTPError(RequestException): ...
|
||||
class ConnectionError(RequestException): ...
|
||||
class ProxyError(ConnectionError): ...
|
||||
class SSLError(ConnectionError): ...
|
||||
|
||||
Reference in New Issue
Block a user