diff --git a/rewrite/rewrite/python/utils/tree_visiting_printer.py b/rewrite/rewrite/python/utils/tree_visiting_printer.py index 4b6a2d6f..6482a5f2 100644 --- a/rewrite/rewrite/python/utils/tree_visiting_printer.py +++ b/rewrite/rewrite/python/utils/tree_visiting_printer.py @@ -45,7 +45,6 @@ def visit(self, tree: Optional[Tree], p: P, parent: Optional[Cursor] = None) -> def visit_space(self, space: Optional[Space], loc: Optional[Union[PySpace.Location, Space.Location]], p: P) -> Space: - print("Loc", loc, "el,", self._print_element(self.cursor.parent.value)) return super().visit_space(space, loc, p) def _print_tree(self) -> str: @@ -109,8 +108,7 @@ def _print_space(space: Space) -> str: def print_tree_all(tree: "Tree") -> str: visitor = TreeVisitingPrinter() visitor.visit(tree, None, None) - print(visitor._print_tree()) - return "" + return visitor._print_tree() def find_diff_pos(self, cursor_stack, last_cursor_stack): diff_pos = -1