1 from _typeshed import SupportsWrite
2 from typing import Any, Callable, Tuple, Type, TypeVar
5 _FuncT = TypeVar("_FuncT", bound=Callable[..., Any])
7 # These definitions have special processing in mypy
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]: ...
16 def abstractmethod(funcobj: _FuncT) -> _FuncT: ...
18 class abstractproperty(property): ...
20 # These two are deprecated and not supported by mypy
21 def abstractstaticmethod(callable: _FuncT) -> _FuncT: ...
22 def abstractclassmethod(callable: _FuncT) -> _FuncT: ...
24 class ABC(metaclass=ABCMeta): ...
26 def get_cache_token() -> object: ...