From 51b5f80ae3080dfec2db815a299a69873fb9ca65 Mon Sep 17 00:00:00 2001 From: hydrogen602 Date: Sat, 11 May 2024 23:29:20 -0500 Subject: [PATCH] fix for Lib/test/test_future_stmt/test_future.py: test_annotations --- ast/src/unparse.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ast/src/unparse.rs b/ast/src/unparse.rs index 95c0ba5..ae4a2d1 100644 --- a/ast/src/unparse.rs +++ b/ast/src/unparse.rs @@ -379,12 +379,7 @@ impl<'a> Unparser<'a> { } Expr::Subscript(crate::ExprSubscript { value, slice, .. }) => { self.unparse_expr(value, precedence::ATOM)?; - let mut lvl = precedence::TUPLE; - if let Expr::Tuple(crate::ExprTuple { elts, .. }) = slice.as_ref() { - if elts.iter().any(|expr| expr.is_starred_expr()) { - lvl += 1 - } - } + let lvl = precedence::TUPLE; self.p("[")?; self.unparse_expr(slice, lvl)?; self.p("]")?;