mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
stdlib: add argument default values (#9501)
This commit is contained in:
@@ -41,8 +41,8 @@ class IMAP4:
|
||||
capabilities: tuple[str, ...]
|
||||
PROTOCOL_VERSION: str
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(self, host: str = ..., port: int = ..., timeout: float | None = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: int = ..., timeout: float | None = ...) -> None: ...
|
||||
def __init__(self, host: str = "", port: int = 143, timeout: float | None = None) -> None: ...
|
||||
def open(self, host: str = "", port: int = 143, timeout: float | None = None) -> None: ...
|
||||
else:
|
||||
def __init__(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: int = ...) -> None: ...
|
||||
@@ -77,11 +77,11 @@ class IMAP4:
|
||||
def getannotation(self, mailbox: str, entry: str, attribute: str) -> _CommandResults: ...
|
||||
def getquota(self, root: str) -> _CommandResults: ...
|
||||
def getquotaroot(self, mailbox: str) -> _CommandResults: ...
|
||||
def list(self, directory: str = ..., pattern: str = ...) -> tuple[str, _AnyResponseData]: ...
|
||||
def list(self, directory: str = '""', pattern: str = "*") -> tuple[str, _AnyResponseData]: ...
|
||||
def login(self, user: str, password: str) -> tuple[Literal["OK"], _list[bytes]]: ...
|
||||
def login_cram_md5(self, user: str, password: str) -> _CommandResults: ...
|
||||
def logout(self) -> tuple[str, _AnyResponseData]: ...
|
||||
def lsub(self, directory: str = ..., pattern: str = ...) -> _CommandResults: ...
|
||||
def lsub(self, directory: str = '""', pattern: str = "*") -> _CommandResults: ...
|
||||
def myrights(self, mailbox: str) -> _CommandResults: ...
|
||||
def namespace(self) -> _CommandResults: ...
|
||||
def noop(self) -> tuple[str, _list[bytes]]: ...
|
||||
@@ -89,12 +89,12 @@ class IMAP4:
|
||||
def proxyauth(self, user: str) -> _CommandResults: ...
|
||||
def rename(self, oldmailbox: str, newmailbox: str) -> _CommandResults: ...
|
||||
def search(self, charset: str | None, *criteria: str) -> _CommandResults: ...
|
||||
def select(self, mailbox: str = ..., readonly: bool = ...) -> tuple[str, _list[bytes | None]]: ...
|
||||
def select(self, mailbox: str = "INBOX", readonly: bool = False) -> tuple[str, _list[bytes | None]]: ...
|
||||
def setacl(self, mailbox: str, who: str, what: str) -> _CommandResults: ...
|
||||
def setannotation(self, *args: str) -> _CommandResults: ...
|
||||
def setquota(self, root: str, limits: str) -> _CommandResults: ...
|
||||
def sort(self, sort_criteria: str, charset: str, *search_criteria: str) -> _CommandResults: ...
|
||||
def starttls(self, ssl_context: Any | None = ...) -> tuple[Literal["OK"], _list[None]]: ...
|
||||
def starttls(self, ssl_context: Any | None = None) -> tuple[Literal["OK"], _list[None]]: ...
|
||||
def status(self, mailbox: str, names: str) -> _CommandResults: ...
|
||||
def store(self, message_set: str, command: str, flags: str) -> _CommandResults: ...
|
||||
def subscribe(self, mailbox: str) -> _CommandResults: ...
|
||||
@@ -113,12 +113,12 @@ class IMAP4_SSL(IMAP4):
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(
|
||||
self,
|
||||
host: str = ...,
|
||||
port: int = ...,
|
||||
keyfile: str | None = ...,
|
||||
certfile: str | None = ...,
|
||||
ssl_context: SSLContext | None = ...,
|
||||
timeout: float | None = ...,
|
||||
host: str = "",
|
||||
port: int = 993,
|
||||
keyfile: str | None = None,
|
||||
certfile: str | None = None,
|
||||
ssl_context: SSLContext | None = None,
|
||||
timeout: float | None = None,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
@@ -132,7 +132,7 @@ class IMAP4_SSL(IMAP4):
|
||||
sslobj: SSLSocket
|
||||
file: IO[Any]
|
||||
if sys.version_info >= (3, 9):
|
||||
def open(self, host: str = ..., port: int | None = ..., timeout: float | None = ...) -> None: ...
|
||||
def open(self, host: str = "", port: int | None = 993, timeout: float | None = None) -> None: ...
|
||||
else:
|
||||
def open(self, host: str = ..., port: int | None = ...) -> None: ...
|
||||
|
||||
@@ -146,7 +146,7 @@ class IMAP4_stream(IMAP4):
|
||||
writefile: IO[Any]
|
||||
readfile: IO[Any]
|
||||
if sys.version_info >= (3, 9):
|
||||
def open(self, host: str | None = ..., port: int | None = ..., timeout: float | None = ...) -> None: ...
|
||||
def open(self, host: str | None = None, port: int | None = None, timeout: float | None = None) -> None: ...
|
||||
else:
|
||||
def open(self, host: str | None = ..., port: int | None = ...) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user