def variables_in_lines(self) -> List[Variable]: """ A list of Variable objects contained within the lines returned by .lines. """ return unique_in_order( var for line in self.lines if isinstance(line, Line) for var, node in self.variables_by_lineno[line.lineno])
def variables_in_executing_piece(self) -> List[Variable]: """ A list of Variable objects contained within the lines in the range returned by .executing_piece. """ return unique_in_order( var for lineno in self.executing_piece for var, node in self.variables_by_lineno[lineno])
def variables_in_executing_piece(self): start, end = self.executing_piece return unique_in_order( var for lineno in range(start, end) for var, node in self.variables_by_lineno[lineno])
def variables_in_lines(self): return unique_in_order( var for line in self.lines if isinstance(line, Line) for var, node in self.variables_by_lineno[line.lineno])