mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Type http.client.HTTPConnection.sock (#8386)
This commit is contained in:
@@ -157,7 +157,7 @@ class HTTPConnection:
|
||||
timeout: float | None
|
||||
host: str
|
||||
port: int
|
||||
sock: Any
|
||||
sock: socket | Any # can be `None` if `.connect()` was not called
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
@@ -180,6 +180,8 @@ class HTTPConnection:
|
||||
def send(self, data: _DataType) -> None: ...
|
||||
|
||||
class HTTPSConnection(HTTPConnection):
|
||||
# Can be `None` if `.connect()` was not called:
|
||||
sock: ssl.SSLSocket | Any # type: ignore[override]
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
|
||||
Reference in New Issue
Block a user