@@ -8,7 +8,6 @@ from typing import ( # noqa: Y022,Y038,UP035,Y057
88 AsyncIterator as AsyncIterator ,
99 Awaitable as Awaitable ,
1010 ByteString as ByteString ,
11- Callable as Callable ,
1211 ClassVar ,
1312 Collection as Collection ,
1413 Container as Container ,
@@ -25,6 +24,7 @@ from typing import ( # noqa: Y022,Y038,UP035,Y057
2524 MutableMapping as MutableMapping ,
2625 MutableSequence as MutableSequence ,
2726 MutableSet as MutableSet ,
27+ ParamSpec ,
2828 Protocol ,
2929 Reversible as Reversible ,
3030 Sequence as Sequence ,
@@ -65,9 +65,16 @@ __all__ = [
6565if sys .version_info >= (3 , 12 ):
6666 __all__ += ["Buffer" ]
6767
68+ _T_co = TypeVar ("_T_co" , covariant = True )
6869_KT_co = TypeVar ("_KT_co" , covariant = True ) # Key type covariant containers.
6970_VT_co = TypeVar ("_VT_co" , covariant = True ) # Value type covariant containers.
7071
72+ _P = ParamSpec ("_P" )
73+
74+ class Callable (Protocol [_P , _T_co ]):
75+ @abstractmethod
76+ def __call__ (self , * args : _P .args , ** kwargs : _P .kwargs ) -> _T_co : ...
77+
7178@final
7279class dict_keys (KeysView [_KT_co ], Generic [_KT_co , _VT_co ]): # undocumented
7380 def __eq__ (self , value : object , / ) -> bool : ...
0 commit comments