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

@@ -22,18 +22,20 @@ _ActionKind: TypeAlias = Literal["default", "error", "ignore", "always", "module
filters: Sequence[tuple[str, str | None, type[Warning], str | None, int]] # undocumented, do not mutate
def showwarning(
message: Warning | str, category: type[Warning], filename: str, lineno: int, file: TextIO | None = ..., line: str | None = ...
message: Warning | str,
category: type[Warning],
filename: str,
lineno: int,
file: TextIO | None = None,
line: str | None = None,
) -> None: ...
def formatwarning(message: Warning | str, category: type[Warning], filename: str, lineno: int, line: str | None = ...) -> str: ...
def formatwarning(
message: Warning | str, category: type[Warning], filename: str, lineno: int, line: str | None = None
) -> str: ...
def filterwarnings(
action: _ActionKind,
message: str = ...,
category: type[Warning] = ...,
module: str = ...,
lineno: int = ...,
append: bool = ...,
action: _ActionKind, message: str = "", category: type[Warning] = ..., module: str = "", lineno: int = 0, append: bool = False
) -> None: ...
def simplefilter(action: _ActionKind, category: type[Warning] = ..., lineno: int = ..., append: bool = ...) -> None: ...
def simplefilter(action: _ActionKind, category: type[Warning] = ..., lineno: int = 0, append: bool = False) -> None: ...
def resetwarnings() -> None: ...
class _OptionError(Exception): ...
@@ -52,9 +54,9 @@ class WarningMessage:
category: type[Warning],
filename: str,
lineno: int,
file: TextIO | None = ...,
line: str | None = ...,
source: Any | None = ...,
file: TextIO | None = None,
line: str | None = None,
source: Any | None = None,
) -> None: ...
class catch_warnings(Generic[_W]):