Add missing __isabstractmethods__ attributes in abc and `functools1 (#7205)

This commit is contained in:
Alex Waygood
2022-02-14 19:20:07 +00:00
committed by GitHub
parent 66a229b709
commit dea12b2c47
2 changed files with 5 additions and 1 deletions

View File

@@ -27,7 +27,9 @@ class abstractstaticmethod(staticmethod[_R_co], Generic[_R_co]):
__isabstractmethod__: Literal[True]
def __init__(self, callable: Callable[..., _R_co]) -> None: ...
class abstractproperty(property): ...
class abstractproperty(property):
__isabstractmethod__: Literal[True]
class ABC(metaclass=ABCMeta): ...
def get_cache_token() -> object: ...

View File

@@ -99,6 +99,8 @@ if sys.version_info >= (3, 8):
dispatcher: _SingleDispatchCallable[_T]
func: Callable[..., _T]
def __init__(self, func: Callable[..., _T]) -> None: ...
@property
def __isabstractmethod__(self) -> bool: ...
@overload
def register(self, cls: type[Any], method: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
@overload