mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
imaplib.pyi: Add ssl_context parameter for Python >= 3.3 (#3310)
Fixes: #3289
This commit is contained in:
committed by
Sebastian Rittau
parent
b9342eca0a
commit
717cd1f96f
@@ -5,7 +5,7 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
from socket import socket as _socket
|
||||
from ssl import SSLSocket
|
||||
from ssl import SSLSocket, SSLContext
|
||||
from typing import Any, Callable, Dict, IO, List, Optional, Pattern, Text, Tuple, Type, Union
|
||||
|
||||
CommandResults = Tuple[str, List[Any]]
|
||||
@@ -89,7 +89,10 @@ class IMAP4:
|
||||
class IMAP4_SSL(IMAP4):
|
||||
keyfile: str = ...
|
||||
certfile: str = ...
|
||||
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...) -> None: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ..., ssl_context: Optional[SSLContext] = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...) -> None: ...
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
sock: _socket = ...
|
||||
|
||||
Reference in New Issue
Block a user