11from collections .abc import Callable
22import contextlib
3- from typing import Any , Literal , ParamSpec , TypedDict , TypeVar , Unpack , overload
4-
5- _P = ParamSpec ("_P" )
6- _R = TypeVar ("_R" )
7- _T = TypeVar ("_T" )
3+ from typing import Any , Literal , TypedDict , Unpack , overload
84
95class MatplotlibDeprecationWarning (DeprecationWarning ): ...
106
@@ -20,9 +16,9 @@ class NamedDeprecationKwargs(DeprecationKwargs, total=False):
2016 name : str
2117
2218def warn_deprecated (since : str , ** kwargs : Unpack [NamedDeprecationKwargs ]) -> None : ...
23- def deprecated (
19+ def deprecated [ T ] (
2420 since : str , ** kwargs : Unpack [NamedDeprecationKwargs ]
25- ) -> Callable [[_T ], _T ]: ...
21+ ) -> Callable [[T ], T ]: ...
2622
2723class deprecate_privatize_attribute (Any ):
2824 def __init__ (self , since : str , ** kwargs : Unpack [NamedDeprecationKwargs ]): ...
@@ -31,42 +27,42 @@ class deprecate_privatize_attribute(Any):
3127DECORATORS : dict [Callable , Callable ] = ...
3228
3329@overload
34- def rename_parameter (
30+ def rename_parameter [ ** P , R ] (
3531 since : str , old : str , new : str , func : None = ...
36- ) -> Callable [[Callable [_P , _R ]], Callable [_P , _R ]]: ...
32+ ) -> Callable [[Callable [P , R ]], Callable [P , R ]]: ...
3733@overload
38- def rename_parameter (
39- since : str , old : str , new : str , func : Callable [_P , _R ]
40- ) -> Callable [_P , _R ]: ...
34+ def rename_parameter [ ** P , R ] (
35+ since : str , old : str , new : str , func : Callable [P , R ]
36+ ) -> Callable [P , R ]: ...
4137
4238class _deprecated_parameter_class : ...
4339
4440_deprecated_parameter : _deprecated_parameter_class
4541
4642@overload
47- def delete_parameter (
43+ def delete_parameter [ ** P , R ] (
4844 since : str , name : str , func : None = ..., ** kwargs : Unpack [DeprecationKwargs ]
49- ) -> Callable [[Callable [_P , _R ]], Callable [_P , _R ]]: ...
45+ ) -> Callable [[Callable [P , R ]], Callable [P , R ]]: ...
5046@overload
51- def delete_parameter (
52- since : str , name : str , func : Callable [_P , _R ], ** kwargs : Unpack [DeprecationKwargs ]
53- ) -> Callable [_P , _R ]: ...
47+ def delete_parameter [ ** P , R ] (
48+ since : str , name : str , func : Callable [P , R ], ** kwargs : Unpack [DeprecationKwargs ]
49+ ) -> Callable [P , R ]: ...
5450@overload
55- def make_keyword_only (
51+ def make_keyword_only [ ** P , R ] (
5652 since : str , name : str , func : None = ...
57- ) -> Callable [[Callable [_P , _R ]], Callable [_P , _R ]]: ...
53+ ) -> Callable [[Callable [P , R ]], Callable [P , R ]]: ...
5854@overload
59- def make_keyword_only (
60- since : str , name : str , func : Callable [_P , _R ]
61- ) -> Callable [_P , _R ]: ...
62- def deprecate_method_override (
63- method : Callable [_P , _R ],
55+ def make_keyword_only [ ** P , R ] (
56+ since : str , name : str , func : Callable [P , R ]
57+ ) -> Callable [P , R ]: ...
58+ def deprecate_method_override [ ** P , R ] (
59+ method : Callable [P , R ],
6460 obj : object | type ,
6561 * ,
6662 allow_empty : bool = ...,
6763 since : str ,
6864 ** kwargs : Unpack [NamedDeprecationKwargs ]
69- ) -> Callable [_P , _R ]: ...
65+ ) -> Callable [P , R ]: ...
7066def suppress_matplotlib_deprecation_warning () -> (
7167 contextlib .AbstractContextManager [None ]
7268): ...
0 commit comments