@@ -74,6 +74,17 @@ def visit_Bytes(self, node):
74
74
)
75
75
return gast .copy_location (new_node , node )
76
76
77
+ def visit_ClassDef (self , node ):
78
+ new_node = gast .ClassDef (
79
+ self ._visit (node .name ),
80
+ self ._visit (node .bases ),
81
+ self ._visit (node .keywords ),
82
+ self ._visit (node .body ),
83
+ self ._visit (node .decorator_list ),
84
+ [], # type_params
85
+ )
86
+ return gast .copy_location (new_node , node )
87
+
77
88
def visit_FunctionDef (self , node ):
78
89
new_node = gast .FunctionDef (
79
90
self ._visit (node .name ),
@@ -226,6 +237,18 @@ def visit_comprehension(self, node):
226
237
return ast .copy_location (new_node , node )
227
238
228
239
if 8 <= sys .version_info .minor < 12 :
240
+
241
+ def visit_ClassDef (self , node ):
242
+ new_node = gast .ClassDef (
243
+ self ._visit (node .name ),
244
+ self ._visit (node .bases ),
245
+ self ._visit (node .keywords ),
246
+ self ._visit (node .body ),
247
+ self ._visit (node .decorator_list ),
248
+ [], # type_params
249
+ )
250
+ return gast .copy_location (new_node , node )
251
+
229
252
def visit_FunctionDef (self , node ):
230
253
new_node = gast .FunctionDef (
231
254
self ._visit (node .name ),
0 commit comments