File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2159,7 +2159,6 @@ def __repr__(self):
21592159__mod__
21602160__mul__
21612161__neg__
2162- __new__
21632162__next__
21642163__or__
21652164__pos__
@@ -4227,6 +4226,9 @@ def state_modulename_name(self, line):
42274226 module , cls = self .clinic ._module_and_class (fields )
42284227
42294228 fields = full_name .split ('.' )
4229+ if fields [- 1 ] in unsupported_special_methods :
4230+ fail (f"{ fields [- 1 ]} is a special method and cannot be converted to Argument Clinic! (Yet.)" )
4231+
42304232 if fields [- 1 ] == '__new__' :
42314233 if (self .kind != CLASS_METHOD ) or (not cls ):
42324234 fail ("__new__ must be a class method!" )
@@ -4237,8 +4239,6 @@ def state_modulename_name(self, line):
42374239 self .kind = METHOD_INIT
42384240 if not return_converter :
42394241 return_converter = init_return_converter ()
4240- elif fields [- 1 ] in unsupported_special_methods :
4241- fail (fields [- 1 ] + " is a special method and cannot be converted to Argument Clinic! (Yet.)" )
42424242
42434243 if not return_converter :
42444244 return_converter = CReturnConverter ()
You can’t perform that action at this time.
0 commit comments