We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
http.client.HTTPConnection.sock
1 parent df90510 commit abd893aCopy full SHA for abd893a
stdlib/http/client.pyi
@@ -157,7 +157,7 @@ class HTTPConnection:
157
timeout: float | None
158
host: str
159
port: int
160
- sock: Any
+ sock: socket | Any # can be `None` if `.connect()` was not called
161
def __init__(
162
self,
163
host: str,
@@ -180,6 +180,8 @@ class HTTPConnection:
180
def send(self, data: _DataType) -> None: ...
181
182
class HTTPSConnection(HTTPConnection):
183
+ # Can be `None` if `.connect()` was not called:
184
+ sock: ssl.SSLSocket | Any # type: ignore[override]
185
186
187
0 commit comments