-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
_warnings.pyi
55 lines (51 loc) · 1.53 KB
/
_warnings.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import sys
from typing import Any, overload
_defaultaction: str
_onceregistry: dict[Any, Any]
filters: list[tuple[str, str | None, type[Warning], str | None, int]]
if sys.version_info >= (3, 12):
@overload
def warn(
message: str,
category: type[Warning] | None = None,
stacklevel: int = 1,
source: Any | None = None,
*,
skip_file_prefixes: tuple[str, ...] = (),
) -> None: ...
@overload
def warn(
message: Warning,
category: Any = None,
stacklevel: int = 1,
source: Any | None = None,
*,
skip_file_prefixes: tuple[str, ...] = (),
) -> None: ...
else:
@overload
def warn(message: str, category: type[Warning] | None = None, stacklevel: int = 1, source: Any | None = None) -> None: ...
@overload
def warn(message: Warning, category: Any = None, stacklevel: int = 1, source: Any | None = None) -> None: ...
@overload
def warn_explicit(
message: str,
category: type[Warning],
filename: str,
lineno: int,
module: str | None = ...,
registry: dict[str | tuple[str, type[Warning], int], int] | None = ...,
module_globals: dict[str, Any] | None = ...,
source: Any | None = ...,
) -> None: ...
@overload
def warn_explicit(
message: Warning,
category: Any,
filename: str,
lineno: int,
module: str | None = ...,
registry: dict[str | tuple[str, type[Warning], int], int] | None = ...,
module_globals: dict[str, Any] | None = ...,
source: Any | None = ...,
) -> None: ...