From fccbc485f52036347d62ba9f850bb17a6ea4dcc9 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Fri, 17 Apr 2020 09:38:42 +0800 Subject: [PATCH] remove redundant visit func, test=develop (#23877) --- .../fluid/dygraph/dygraph_to_static/ast_transformer.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py b/python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py index 37e9f6434d1..cba2c6077aa 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py @@ -142,15 +142,6 @@ class BasicApiTransformer(gast.NodeTransformer): self.visit(self.root) return self.wrapper_root - def visit_FunctionDef(self, node): - self.generic_visit(node) - if hasattr(node, 'decorator_list'): - decorator_list = [ - d for d in node.decorator_list if d.id not in DECORATOR_NAMES - ] - node.decorator_list = decorator_list - return node - def visit_Assign(self, node): if self._update_class_node_dict(node): return None -- GitLab