@@ -4733,19 +4733,18 @@ def test_builtins_have_signatures(self):
4733
4733
# These have unrepresentable parameter default values of NULL
4734
4734
needs_null = {"anext" }
4735
4735
no_signature |= needs_null
4736
- # These need PEP 457 groups or a signature change to accept None
4737
- needs_semantic_update = {"round" }
4738
- no_signature |= needs_semantic_update
4739
4736
# These need *args support in Argument Clinic
4740
- needs_varargs = {"breakpoint" , "min" , "max" , "print" ,
4741
- "__build_class__" }
4737
+ needs_varargs = {"breakpoint" , "min" , "max" , "__build_class__" }
4742
4738
no_signature |= needs_varargs
4743
4739
# These simply weren't covered in the initial AC conversion
4744
4740
# for builtin callables
4745
- not_converted_yet = { "open" , "__import__" }
4741
+ not_converted_yet = set ()
4746
4742
no_signature |= not_converted_yet
4747
4743
# These builtin types are expected to provide introspection info
4748
- types_with_signatures = set ()
4744
+ types_with_signatures = {
4745
+ 'complex' , 'enumerate' , 'float' , 'list' , 'memoryview' , 'object' ,
4746
+ 'property' , 'reversed' , 'tuple' ,
4747
+ }
4749
4748
# Check the signatures we expect to be there
4750
4749
ns = vars (builtins )
4751
4750
for name , obj in sorted (ns .items ()):
@@ -4764,9 +4763,9 @@ def test_builtins_have_signatures(self):
4764
4763
# This ensures this test will start failing as more signatures are
4765
4764
# added, so the affected items can be moved into the scope of the
4766
4765
# regression test above
4767
- for name in no_signature :
4766
+ for name in no_signature - needs_null :
4768
4767
with self .subTest (builtin = name ):
4769
- self .assertIsNone (obj .__text_signature__ )
4768
+ self .assertIsNone (ns [ name ] .__text_signature__ )
4770
4769
4771
4770
def test_python_function_override_signature (self ):
4772
4771
def func (* args , ** kwargs ):
0 commit comments