Skip to content

Commit dea12b2

Browse files
authored
Add missing __isabstractmethods__ attributes in abc and `functools1 (#7205)
1 parent 66a229b commit dea12b2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

stdlib/abc.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ class abstractstaticmethod(staticmethod[_R_co], Generic[_R_co]):
2727
__isabstractmethod__: Literal[True]
2828
def __init__(self, callable: Callable[..., _R_co]) -> None: ...
2929

30-
class abstractproperty(property): ...
30+
class abstractproperty(property):
31+
__isabstractmethod__: Literal[True]
32+
3133
class ABC(metaclass=ABCMeta): ...
3234

3335
def get_cache_token() -> object: ...

stdlib/functools.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ if sys.version_info >= (3, 8):
9999
dispatcher: _SingleDispatchCallable[_T]
100100
func: Callable[..., _T]
101101
def __init__(self, func: Callable[..., _T]) -> None: ...
102+
@property
103+
def __isabstractmethod__(self) -> bool: ...
102104
@overload
103105
def register(self, cls: type[Any], method: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
104106
@overload

0 commit comments

Comments
 (0)