Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/_warnings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down
4 changes: 3 additions & 1 deletion stdlib/warnings.pyi
Original file line number Diff line number Diff line change
@@ -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: ...
Expand Down