massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / Deprecated / deprecated / sphinx.pyi
1 from typing import Any, Callable, Type, TypeVar
2 from typing_extensions import Literal
3
4 from .classic import ClassicAdapter, _Actions
5
6 _F = TypeVar("_F", bound=Callable[..., Any])
7
8 class SphinxAdapter(ClassicAdapter):
9     directive: Literal["versionadded", "versionchanged", "deprecated"]
10     reason: str
11     version: str
12     action: _Actions | None
13     category: Type[Warning]
14     def __init__(
15         self,
16         directive: Literal["versionadded", "versionchanged", "deprecated"],
17         reason: str = ...,
18         version: str = ...,
19         action: _Actions | None = ...,
20         category: Type[Warning] = ...,
21     ) -> None: ...
22     def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
23
24 def versionadded(reason: str = ..., version: str = ...) -> Callable[[_F], _F]: ...
25 def versionchanged(reason: str = ..., version: str = ...) -> Callable[[_F], _F]: ...
26 def deprecated(
27     reason: str = ...,
28     version: str = ...,
29     line_length: int = ...,
30     *,
31     action: _Actions | None = ...,
32     category: Type[Warning] | None = ...,
33 ) -> Callable[[_F], _F]: ...