def visit_raise(self, node, parent): """visit a Raise node by returning a fresh instance of it""" newnode = new.Raise() _lineno_parent(node, newnode, parent) # no traceback; anyway it is not used in Pylint if node.exc is not None: newnode.exc = self.visit(node.exc, newnode) if node.cause is not None: newnode.cause = self.visit(node.cause, newnode) newnode.set_line_info(newnode.last_child()) return newnode
def visit_raise(self, node, parent, assign_ctx=None): """visit a Raise node by returning a fresh instance of it""" newnode = new.Raise() _lineno_parent(node, newnode, parent) if node.type is not None: newnode.exc = self.visit(node.type, newnode, assign_ctx) if node.inst is not None: newnode.inst = self.visit(node.inst, newnode, assign_ctx) if node.tback is not None: newnode.tback = self.visit(node.tback, newnode, assign_ctx) return newnode
def visit_raise(self, node, parent): """visit a Raise node by returning a fresh instance of it""" newnode = new.Raise() _lineno_parent(node, newnode, parent) if node.type is not None: newnode.exc = self.visit(node.type, newnode) if node.inst is not None: newnode.inst = self.visit(node.inst, newnode) if node.tback is not None: newnode.tback = self.visit(node.tback, newnode) newnode.set_line_info(newnode.last_child()) return newnode