Repository navigation
Expand file tree
/
Copy pathdeprecation.pyi
More file actions
68 lines (58 loc) · 2.07 KB
/
Copy pathdeprecation.pyi
File metadata and controls
68 lines (58 loc) · 2.07 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
from collections.abc import Callable
import contextlib
from typing import Any, Literal, TypedDict, Unpack, overload
class MatplotlibDeprecationWarning(DeprecationWarning): ...
class DeprecationKwargs(TypedDict, total=False):
message: str
alternative: str
pending: bool
obj_type: str
addendum: str
removal: str | Literal[False]
class NamedDeprecationKwargs(DeprecationKwargs, total=False):
name: str
def warn_deprecated(since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> None: ...
def deprecated[T](
since: str, **kwargs: Unpack[NamedDeprecationKwargs]
) -> Callable[[T], T]: ...
class deprecate_privatize_attribute(Any):
def __init__(self, since: str, **kwargs: Unpack[NamedDeprecationKwargs]): ...
def __set_name__(self, owner: type[object], name: str) -> None: ...
DECORATORS: dict[Callable, Callable] = ...
@overload
def rename_parameter[**P, R](
since: str, old: str, new: str, func: None = ...
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def rename_parameter[**P, R](
since: str, old: str, new: str, func: Callable[P, R]
) -> Callable[P, R]: ...
class _deprecated_parameter_class: ...
_deprecated_parameter: _deprecated_parameter_class
@overload
def delete_parameter[**P, R](
since: str, name: str, func: None = ..., **kwargs: Unpack[DeprecationKwargs]
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def delete_parameter[**P, R](
since: str, name: str, func: Callable[P, R], **kwargs: Unpack[DeprecationKwargs]
) -> Callable[P, R]: ...
@overload
def make_keyword_only[**P, R](
since: str, name: str, func: None = ...
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def make_keyword_only[**P, R](
since: str, name: str, func: Callable[P, R]
) -> Callable[P, R]: ...
def deprecate_method_override[**P, R](
method: Callable[P, R],
obj: object | type,
*,
allow_empty: bool = ...,
since: str,
**kwargs: Unpack[NamedDeprecationKwargs]
) -> Callable[P, R]: ...
def suppress_matplotlib_deprecation_warning() -> (
contextlib.AbstractContextManager[None]
): ...