diff --git a/stdlib/_warnings.pyi b/stdlib/_warnings.pyi index b7023cea8fe3..fef73e69c626 100644 --- a/stdlib/_warnings.pyi +++ b/stdlib/_warnings.pyi @@ -2,7 +2,7 @@ from typing import Any, Tuple, Type, overload _defaultaction: str _onceregistry: dict[Any, Any] -filters: list[Tuple[Any, ...]] +filters: list[tuple[str, str | None, Type[Warning], str | None, int]] @overload def warn(message: str, category: Type[Warning] | None = ..., stacklevel: int = ..., source: Any | None = ...) -> None: ... diff --git a/stdlib/warnings.pyi b/stdlib/warnings.pyi index 514bea3a225d..62c41c871853 100644 --- a/stdlib/warnings.pyi +++ b/stdlib/warnings.pyi @@ -1,9 +1,11 @@ from types import ModuleType, TracebackType -from typing import Any, TextIO, Type, overload +from typing import Any, Sequence, TextIO, Type, overload from typing_extensions import Literal from _warnings import warn as warn, warn_explicit as warn_explicit +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 = ... ) -> None: ...