Commit 681da667 authored by Stefan Behnel's avatar Stefan Behnel

repair fused def code

parent 2879c9fa
...@@ -1331,7 +1331,7 @@ class DecoratorTransform(ScopeTrackingTransform, SkipDeclarations): ...@@ -1331,7 +1331,7 @@ class DecoratorTransform(ScopeTrackingTransform, SkipDeclarations):
return self._add_to_property(properties, node, handler_name, decorator_node) return self._add_to_property(properties, node, handler_name, decorator_node)
# transform normal decorators # transform normal decorators
return self._chain_decorators(node, node.decorators, node.name) return self.chain_decorators(node, node.decorators, node.name)
@staticmethod @staticmethod
def _reject_decorated_property(node, decorator_node): def _reject_decorated_property(node, decorator_node):
...@@ -1356,7 +1356,7 @@ class DecoratorTransform(ScopeTrackingTransform, SkipDeclarations): ...@@ -1356,7 +1356,7 @@ class DecoratorTransform(ScopeTrackingTransform, SkipDeclarations):
return [] return []
@staticmethod @staticmethod
def _chain_decorators(node, decorators, name): def chain_decorators(node, decorators, name):
""" """
Decorators are applied directly in DefNode and PyClassDefNode to avoid Decorators are applied directly in DefNode and PyClassDefNode to avoid
reassignments to the function/class name - except for cdef class methods. reassignments to the function/class name - except for cdef class methods.
...@@ -1575,7 +1575,7 @@ if VALUE is not None: ...@@ -1575,7 +1575,7 @@ if VALUE is not None:
if decorators: if decorators:
transform = DecoratorTransform(self.context) transform = DecoratorTransform(self.context)
def_node = node.node def_node = node.node
_, reassignments = transform.handle_decorators( _, reassignments = transform.chain_decorators(
def_node, decorators, def_node.name) def_node, decorators, def_node.name)
reassignments.analyse_declarations(env) reassignments.analyse_declarations(env)
node = [node, reassignments] node = [node, reassignments]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment