Skip to content

Commit c4f7c34

Browse files
committed
fix collections.abc.Callable and typing.Callable
1 parent 897ffbe commit c4f7c34

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from __future__ import annotations
2+
3+
from collections.abc import Callable
4+
from typing_extensions import assert_type
5+
6+
assert_type(Callable, type[Callable])
7+
8+
_: type[Callable] = Callable
9+
10+
11+
class C(Callable): ...
12+
13+
14+
def f(c: Callable) -> None:
15+
_ = c.__call__

stdlib/_collections_abc.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ _P = ParamSpec("_P")
7373

7474
@runtime_checkable
7575
class Callable(Protocol[_P, _R_co], metaclass=ABCMeta):
76-
7776
__slots__ = ()
7877

7978
@abstractmethod

0 commit comments

Comments
 (0)