stdlib: add argument default values (#9501)

This commit is contained in:
Jelle Zijlstra
2023-01-18 00:37:34 -08:00
committed by GitHub
parent 6cb934291f
commit ddfaca3200
272 changed files with 2529 additions and 2467 deletions

View File

@@ -25,13 +25,13 @@ class POP3:
sock: socket.socket
file: BinaryIO
welcome: bytes
def __init__(self, host: str, port: int = ..., timeout: float = ...) -> None: ...
def __init__(self, host: str, port: int = 110, timeout: float = ...) -> None: ...
def getwelcome(self) -> bytes: ...
def set_debuglevel(self, level: int) -> None: ...
def user(self, user: str) -> bytes: ...
def pass_(self, pswd: str) -> bytes: ...
def stat(self) -> tuple[int, int]: ...
def list(self, which: Any | None = ...) -> _LongResp: ...
def list(self, which: Any | None = None) -> _LongResp: ...
def retr(self, which: Any) -> _LongResp: ...
def dele(self, which: Any) -> bytes: ...
def noop(self) -> bytes: ...
@@ -48,17 +48,17 @@ class POP3:
def uidl(self, which: Any) -> bytes: ...
def utf8(self) -> bytes: ...
def capa(self) -> dict[str, _list[str]]: ...
def stls(self, context: ssl.SSLContext | None = ...) -> bytes: ...
def stls(self, context: ssl.SSLContext | None = None) -> bytes: ...
class POP3_SSL(POP3):
def __init__(
self,
host: str,
port: int = ...,
keyfile: str | None = ...,
certfile: str | None = ...,
port: int = 995,
keyfile: str | None = None,
certfile: str | None = None,
timeout: float = ...,
context: ssl.SSLContext | None = ...,
context: ssl.SSLContext | None = None,
) -> None: ...
# "context" is actually the last argument, but that breaks LSP and it doesn't really matter because all the arguments are ignored
def stls(self, context: Any = ..., keyfile: Any = ..., certfile: Any = ...) -> NoReturn: ...
def stls(self, context: Any = None, keyfile: Any = None, certfile: Any = None) -> NoReturn: ...