11from collections .abc import Callable
2- from typing import Any , Literal , TypeVar
2+ from typing import Any , Literal , TypeVar , overload
33
44from .classic import ClassicAdapter , _Actions
55
@@ -17,11 +17,26 @@ class SphinxAdapter(ClassicAdapter):
1717 reason : str = "" ,
1818 version : str = "" ,
1919 action : _Actions | None = None ,
20- category : type [Warning ] = ... ,
20+ category : type [Warning ] = DeprecationWarning ,
2121 extra_stacklevel : int = 0 ,
2222 line_length : int = 70 ,
2323 ) -> None : ...
24+ @overload
25+ def __call__ (self , wrapped : _F ) -> _F : ...
26+
27+ @overload
2428 def __call__ (self , wrapped : _F ) -> Callable [[_F ], _F ]: ...
29+ """
30+ :param wrapped: Wrapped class or function.
31+
32+ :return: the decorated class or function.
33+ """
34+ def get_deprecated_msg (self , wrapped : _F , instance : Any ) -> str : ...
35+ """
36+ :param wrapped: Wrapped class or function.
37+
38+ :param instance: The object to which the wrapped function was bound when it was called.
39+ """
2540
2641def versionadded (reason : str = "" , version : str = "" , line_length : int = 70 ) -> Callable [[_F ], _F ]: ...
2742def versionchanged (reason : str = "" , version : str = "" , line_length : int = 70 ) -> Callable [[_F ], _F ]: ...
0 commit comments