massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / Deprecated / deprecated / classic.pyi
1 from typing import Any, Callable, Type, TypeVar, overload
2 from typing_extensions import Literal
3
4 _F = TypeVar("_F", bound=Callable[..., Any])
5 _Actions = Literal["default", "error", "ignore", "always", "module", "once"]
6
7 class ClassicAdapter:
8     reason: str
9     version: str
10     action: _Actions | None
11     category: Type[Warning]
12     def __init__(
13         self, reason: str = ..., version: str = ..., action: _Actions | None = ..., category: Type[Warning] = ...
14     ) -> None: ...
15     def get_deprecated_msg(self, wrapped: Callable[..., Any], instance: object) -> str: ...
16     def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
17
18 @overload
19 def deprecated(__wrapped: _F) -> _F: ...
20 @overload
21 def deprecated(
22     reason: str = ..., *, version: str = ..., action: _Actions | None = ..., category: Type[Warning] | None = ...
23 ) -> Callable[[_F], _F]: ...