massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / Deprecated / deprecated / classic.pyi
diff --git a/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi b/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi
new file mode 100644 (file)
index 0000000..b6f5462
--- /dev/null
@@ -0,0 +1,23 @@
+from typing import Any, Callable, Type, TypeVar, overload
+from typing_extensions import Literal
+
+_F = TypeVar("_F", bound=Callable[..., Any])
+_Actions = Literal["default", "error", "ignore", "always", "module", "once"]
+
+class ClassicAdapter:
+    reason: str
+    version: str
+    action: _Actions | None
+    category: Type[Warning]
+    def __init__(
+        self, reason: str = ..., version: str = ..., action: _Actions | None = ..., category: Type[Warning] = ...
+    ) -> None: ...
+    def get_deprecated_msg(self, wrapped: Callable[..., Any], instance: object) -> str: ...
+    def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
+
+@overload
+def deprecated(__wrapped: _F) -> _F: ...
+@overload
+def deprecated(
+    reason: str = ..., *, version: str = ..., action: _Actions | None = ..., category: Type[Warning] | None = ...
+) -> Callable[[_F], _F]: ...