massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / abc.pyi
1 from _typeshed import SupportsWrite
2 from typing import Any, Callable, Tuple, Type, TypeVar
3
4 _T = TypeVar("_T")
5 _FuncT = TypeVar("_FuncT", bound=Callable[..., Any])
6
7 # These definitions have special processing in mypy
8 class ABCMeta(type):
9     __abstractmethods__: frozenset[str]
10     def __init__(self, name: str, bases: Tuple[type, ...], namespace: dict[str, Any]) -> None: ...
11     def __instancecheck__(cls: ABCMeta, instance: Any) -> Any: ...
12     def __subclasscheck__(cls: ABCMeta, subclass: Any) -> Any: ...
13     def _dump_registry(cls: ABCMeta, file: SupportsWrite[str] | None = ...) -> None: ...
14     def register(cls: ABCMeta, subclass: Type[_T]) -> Type[_T]: ...
15
16 def abstractmethod(funcobj: _FuncT) -> _FuncT: ...
17
18 class abstractproperty(property): ...
19
20 # These two are deprecated and not supported by mypy
21 def abstractstaticmethod(callable: _FuncT) -> _FuncT: ...
22 def abstractclassmethod(callable: _FuncT) -> _FuncT: ...
23
24 class ABC(metaclass=ABCMeta): ...
25
26 def get_cache_token() -> object: ...