Commit db77dc22 authored by Evan Bolyen's avatar Evan Bolyen
Browse files

AST changes in py3.10

parent 66422e3d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -206,7 +206,6 @@ class _PredicateRemover(ast.NodeVisitor):
        super().__init__()

    def visit_Name(self, node):
        print(node.id)
        if self.tuple_count == 0:
            self.expression += node.id
        else:
@@ -229,6 +228,10 @@ class _PredicateRemover(ast.NodeVisitor):
        if post_strip < pre_strip:
            self.expression += ', '

    def visit_Subscript(self, node):
        # Changed by Python 3.10
        self.visit_Index(node)

    def visit_Tuple(self, node):
        self.tuple_count = len(node.elts) - 1
        self.generic_visit(node)