File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2159,7 +2159,6 @@ def __repr__(self):
2159
2159
__mod__
2160
2160
__mul__
2161
2161
__neg__
2162
- __new__
2163
2162
__next__
2164
2163
__or__
2165
2164
__pos__
@@ -4227,6 +4226,9 @@ def state_modulename_name(self, line):
4227
4226
module , cls = self .clinic ._module_and_class (fields )
4228
4227
4229
4228
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
+
4230
4232
if fields [- 1 ] == '__new__' :
4231
4233
if (self .kind != CLASS_METHOD ) or (not cls ):
4232
4234
fail ("__new__ must be a class method!" )
@@ -4237,8 +4239,6 @@ def state_modulename_name(self, line):
4237
4239
self .kind = METHOD_INIT
4238
4240
if not return_converter :
4239
4241
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.)" )
4242
4242
4243
4243
if not return_converter :
4244
4244
return_converter = CReturnConverter ()
You can’t perform that action at this time.
0 commit comments