deprecated: complete stubs (#8169)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2022-06-26 15:00:22 +05:30
committed by GitHub
parent 634f18f615
commit ffb25d964c
5 changed files with 11 additions and 5 deletions

View File

@@ -1 +1,4 @@
from .classic import deprecated as deprecated
__credits__: str
__date__: str

View File

@@ -5,6 +5,8 @@ from typing_extensions import Literal, TypeAlias
_F = TypeVar("_F", bound=Callable[..., Any])
_Actions: TypeAlias = Literal["default", "error", "ignore", "always", "module", "once"]
string_types: tuple[type, ...]
class ClassicAdapter:
reason: str
version: str

View File

@@ -19,11 +19,12 @@ class SphinxAdapter(ClassicAdapter):
version: str = ...,
action: _Actions | None = ...,
category: type[Warning] = ...,
line_length: int = ...,
) -> None: ...
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
def versionadded(reason: str = ..., version: str = ...) -> Callable[[_F], _F]: ...
def versionchanged(reason: str = ..., version: str = ...) -> Callable[[_F], _F]: ...
def versionadded(reason: str = ..., version: str = ..., line_length: int = ...) -> Callable[[_F], _F]: ...
def versionchanged(reason: str = ..., version: str = ..., line_length: int = ...) -> Callable[[_F], _F]: ...
def deprecated(
reason: str = ...,
version: str = ...,