Format: application/octet-stream
1 import _weakrefset
2 from typing import Any, Callable, Dict, Set, Tuple, Type, TypeVar
3
4 _FuncT = TypeVar("_FuncT", bound=Callable[..., Any])
5
6 # NOTE: mypy has special processing for ABCMeta and abstractmethod.
7
8 def abstractmethod(funcobj: _FuncT) -> _FuncT: ...
9
10 class ABCMeta(type):
11 # TODO: FrozenSet
12 __abstractmethods__: Set[Any]
13 _abc_cache: _weakrefset.WeakSet[Any]
14 _abc_invalidation_counter: int
15 _abc_negative_cache: _weakrefset.WeakSet[Any]
16 _abc_negative_cache_version: int
17 _abc_registry: _weakrefset.WeakSet[Any]
18 def __init__(self, name: str, bases: Tuple[type, ...], namespace: Dict[Any, Any]) -> None: ...
19 def __instancecheck__(cls: ABCMeta, instance: Any) -> Any: ...
20 def __subclasscheck__(cls: ABCMeta, subclass: Any) -> Any: ...
21 def _dump_registry(cls: ABCMeta, *args: Any, **kwargs: Any) -> None: ...
22 def register(cls: ABCMeta, subclass: Type[Any]) -> None: ...
23
24 # TODO: The real abc.abstractproperty inherits from "property".
25 class abstractproperty(object):
26 def __new__(cls, func: Any) -> Any: ...
27 __isabstractmethod__: bool
28 doc: Any
29 fdel: Any
30 fget: Any
31 fset: Any
32