mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 21:25:31 +00:00
fix for Lib/test/test_future_stmt/test_future.py: test_annotations
This commit is contained in:
parent
649fdd4be9
commit
51b5f80ae3
1 changed files with 1 additions and 6 deletions
|
@ -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("]")?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue