@@ -40,7 +40,7 @@ class _Cell:
40
40
cell_contents : Any
41
41
42
42
@final
43
- class FunctionType :
43
+ class FunctionType ( Callable ) :
44
44
__closure__ : Tuple [_Cell , ...] | None
45
45
__code__ : CodeType
46
46
__defaults__ : Tuple [Any , ...] | None
@@ -248,7 +248,7 @@ class _StaticFunctionType:
248
248
def __get__ (self , obj : object | None , type : type | None ) -> FunctionType : ...
249
249
250
250
@final
251
- class MethodType :
251
+ class MethodType ( Callable ) :
252
252
__closure__ : Tuple [_Cell , ...] | None # inherited from the added function
253
253
__defaults__ : Tuple [Any , ...] | None # inherited from the added function
254
254
__func__ : _StaticFunctionType
@@ -259,7 +259,7 @@ class MethodType:
259
259
def __call__ (self , * args : Any , ** kwargs : Any ) -> Any : ...
260
260
261
261
@final
262
- class BuiltinFunctionType :
262
+ class BuiltinFunctionType ( Callable ) :
263
263
__self__ : object | ModuleType
264
264
__name__ : str
265
265
__qualname__ : str
@@ -269,14 +269,14 @@ BuiltinMethodType = BuiltinFunctionType
269
269
270
270
if sys .version_info >= (3 , 7 ):
271
271
@final
272
- class WrapperDescriptorType :
272
+ class WrapperDescriptorType ( Callable ) :
273
273
__name__ : str
274
274
__qualname__ : str
275
275
__objclass__ : type
276
276
def __call__ (self , * args : Any , ** kwargs : Any ) -> Any : ...
277
277
def __get__ (self , obj : Any , type : type = ...) -> Any : ...
278
278
@final
279
- class MethodWrapperType :
279
+ class MethodWrapperType ( Callable ) :
280
280
__self__ : object
281
281
__name__ : str
282
282
__qualname__ : str
@@ -285,14 +285,14 @@ if sys.version_info >= (3, 7):
285
285
def __eq__ (self , other : Any ) -> bool : ...
286
286
def __ne__ (self , other : Any ) -> bool : ...
287
287
@final
288
- class MethodDescriptorType :
288
+ class MethodDescriptorType ( Callable ) :
289
289
__name__ : str
290
290
__qualname__ : str
291
291
__objclass__ : type
292
292
def __call__ (self , * args : Any , ** kwargs : Any ) -> Any : ...
293
293
def __get__ (self , obj : Any , type : type = ...) -> Any : ...
294
294
@final
295
- class ClassMethodDescriptorType :
295
+ class ClassMethodDescriptorType ( Callable ) :
296
296
__name__ : str
297
297
__qualname__ : str
298
298
__objclass__ : type
@@ -384,9 +384,7 @@ if sys.version_info >= (3, 9):
384
384
def __getattr__ (self , name : str ) -> Any : ... # incomplete
385
385
386
386
if sys .version_info >= (3 , 10 ):
387
- @final
388
- class NoneType :
389
- def __bool__ (self ) -> Literal [False ]: ...
387
+ NoneType = type (None )
390
388
EllipsisType = ellipsis # noqa F811 from builtins
391
389
from builtins import _NotImplementedType
392
390
0 commit comments