Update TupleParentheses usage (#5810)

This commit is contained in:
Chris Pryer 2023-07-24 10:44:36 -04:00 committed by GitHub
parent 8a7dcb794b
commit 8eadacda33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 88 additions and 30 deletions

View file

@ -17,7 +17,7 @@ impl Format<PyFormatContext<'_>> for ExprTupleWithoutParentheses<'_> {
match self.0 {
Expr::Tuple(expr_tuple) => expr_tuple
.format()
.with_options(TupleParentheses::StripInsideForLoop)
.with_options(TupleParentheses::NeverPreserve)
.fmt(f),
other => maybe_parenthesize_expression(other, self.0, Parenthesize::IfBreaks).fmt(f),
}