mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add __enter__, __exit__ to IMAP4, make __init__ arguments optional (#3540)
Fixes #3537
This commit is contained in:
committed by
Sebastian Rittau
parent
fda384fe0a
commit
3e638aa3c3
@@ -29,7 +29,7 @@ class IMAP4:
|
||||
welcome: bytes = ...
|
||||
capabilities: Tuple[str] = ...
|
||||
PROTOCOL_VERSION: str = ...
|
||||
def __init__(self, host: str, port: int) -> None: ...
|
||||
def __init__(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
@@ -54,6 +54,8 @@ class IMAP4:
|
||||
def deleteacl(self, mailbox: str, who: str) -> CommandResults: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def enable(self, capability: str) -> CommandResults: ...
|
||||
def __enter__(self) -> IMAP4: ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def expunge(self) -> CommandResults: ...
|
||||
def fetch(self, message_set: str, message_parts: str) -> CommandResults: ...
|
||||
def getacl(self, mailbox: str) -> CommandResults: ...
|
||||
|
||||
Reference in New Issue
Block a user