mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-08 13:05:14 +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:
1 parent
f3506eba47
commit
e92bfcbab2
1 file changed
+1
-6
@@ -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