@@ -427,26 +427,11 @@ def clear_overloads():
427427}
428428
429429
430- _EXCLUDED_ATTRS = {
431- "__abstractmethods__" , "__annotations__" , "__weakref__" , "_is_protocol" ,
432- "_is_runtime_protocol" , "__dict__" , "__slots__" , "__parameters__" ,
433- "__orig_bases__" , "__module__" , "_MutableMapping__marker" , "__doc__" ,
434- "__subclasshook__" , "__orig_class__" , "__init__" , "__new__" ,
435- "__protocol_attrs__" , "__non_callable_proto_members__" ,
436- "__match_args__" ,
430+ _EXCLUDED_ATTRS = frozenset (typing .EXCLUDED_ATTRIBUTES ) | {
431+ "__match_args__" , "__protocol_attrs__" , "__non_callable_proto_members__" ,
432+ "__final__" ,
437433}
438434
439- if sys .version_info >= (3 , 9 ):
440- _EXCLUDED_ATTRS .add ("__class_getitem__" )
441-
442- if sys .version_info >= (3 , 12 ):
443- _EXCLUDED_ATTRS .add ("__type_params__" )
444-
445- if sys .version_info >= (3 , 13 ):
446- _EXCLUDED_ATTRS .add ("__static_attributes__" )
447-
448- _EXCLUDED_ATTRS = frozenset (_EXCLUDED_ATTRS )
449-
450435
451436def _get_protocol_attrs (cls ):
452437 attrs = set ()
0 commit comments