Add type stubs for socket and ssl modules; update MicromailClient to remove type ignores

This commit is contained in:
Edgar P. Burkhart 2025-05-19 13:39:16 +02:00
parent 77d4da5900
commit ddbf910f34
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
4 changed files with 264 additions and 7 deletions

18
.typestubs/ssl.pyi Normal file
View file

@ -0,0 +1,18 @@
import socket
from _typeshed import StrOrBytesPath
def wrap_socket(
sock: socket.socket,
keyfile: StrOrBytesPath | None = None,
certfile: StrOrBytesPath | None = None,
server_side: bool = False,
cert_reqs: int = ...,
ssl_version: int = ...,
ca_certs: str | None = None,
do_handshake_on_connect: bool = True,
suppress_ragged_eofs: bool = True,
ciphers: str | None = None,
) -> SSLSocket: ...
class SSLSocket(socket.socket): ...