mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-25 14:03:51 +00:00
Update TupleParentheses
usage (#5810)
This commit is contained in:
parent
8a7dcb794b
commit
8eadacda33
7 changed files with 88 additions and 30 deletions
|
@ -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),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue