skip decorator constants

This commit is contained in:
2025-09-04 10:45:28 +05:30
parent f836104b71
commit 8d7c869c47

View File

@ -26,7 +26,9 @@ def constants_processing(tree, module):
nonlocal current_function
old_function = current_function
current_function = node.name
self.generic_visit(node)
for child in ast.iter_child_nodes(node):
if not (hasattr(node, 'decorator_list') and child in node.decorator_list):
self.visit(child)
current_function = old_function
def visit_Constant(self, node):