Lines Matching refs:node
46 def transform(self, node, results):
59 node.replace(Call(Name("next", prefix=node.prefix), base))
67 if is_assign_target(node):
70 self.warning(node, bind_warning)
74 self.warning(node, bind_warning)
78 ### The following functions help test if node is part of an assignment
81 def is_assign_target(node):
82 assign = find_assign(node)
89 elif is_subtree(child, node):
93 def find_assign(node):
94 if node.type == syms.expr_stmt:
95 return node
96 if node.type == syms.simple_stmt or node.parent is None:
98 return find_assign(node.parent)
100 def is_subtree(root, node):
101 if root == node:
103 return any(is_subtree(c, node) for c in root.children)