mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 12:21:27 +08:00
imaplib: update for py39 (#4271)
This commit is contained in:
@@ -30,13 +30,17 @@ class IMAP4:
|
||||
welcome: bytes = ...
|
||||
capabilities: Tuple[str] = ...
|
||||
PROTOCOL_VERSION: str = ...
|
||||
def __init__(self, host: str = ..., port: int = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(self, host: str = ..., port: int = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: int = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
sock: _socket = ...
|
||||
file: Union[IO[Text], IO[bytes]] = ...
|
||||
def open(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def read(self, size: int) -> bytes: ...
|
||||
def readline(self) -> bytes: ...
|
||||
def send(self, data: bytes) -> None: ...
|
||||
@@ -94,7 +98,9 @@ class IMAP4:
|
||||
class IMAP4_SSL(IMAP4):
|
||||
keyfile: str = ...
|
||||
certfile: str = ...
|
||||
if sys.version_info >= (3, 3):
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ..., ssl_context: Optional[SSLContext] = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
elif 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: ...
|
||||
@@ -103,7 +109,10 @@ class IMAP4_SSL(IMAP4):
|
||||
sock: _socket = ...
|
||||
sslobj: SSLSocket = ...
|
||||
file: IO[Any] = ...
|
||||
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def open(self, host: str = ..., port: Optional[int] = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
else:
|
||||
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
|
||||
def read(self, size: int) -> bytes: ...
|
||||
def readline(self) -> bytes: ...
|
||||
def send(self, data: bytes) -> None: ...
|
||||
@@ -122,7 +131,10 @@ class IMAP4_stream(IMAP4):
|
||||
process: subprocess.Popen[bytes] = ...
|
||||
writefile: IO[Any] = ...
|
||||
readfile: IO[Any] = ...
|
||||
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def open(self, host: Optional[str] = ..., port: Optional[int] = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
else:
|
||||
def open(self, host: Optional[str] = ..., port: Optional[int] = ...) -> None: ...
|
||||
def read(self, size: int) -> bytes: ...
|
||||
def readline(self) -> bytes: ...
|
||||
def send(self, data: bytes) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user