Format: application/octet-stream
⬇ Download File (597 B)
   1  from typing import Any, Callable, Type, TypeVar
   2  
   3  _T = TypeVar("_T")
   4  _FuncT = TypeVar("_FuncT", bound=Callable[..., Any])
   5  
   6  # These definitions have special processing in mypy
   7  class ABCMeta(type):
   8      def register(cls: ABCMeta, subclass: Type[_T]) -> Type[_T]: ...
   9  
  10  def abstractmethod(callable: _FuncT) -> _FuncT: ...
  11  
  12  class abstractproperty(property): ...
  13  
  14  # These two are deprecated and not supported by mypy
  15  def abstractstaticmethod(callable: _FuncT) -> _FuncT: ...
  16  def abstractclassmethod(callable: _FuncT) -> _FuncT: ...
  17  
  18  class ABC(metaclass=ABCMeta): ...
  19  
  20  def get_cache_token() -> object: ...
  21