mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Update TupleParentheses
usage (#5810)
This commit is contained in:
parent
8a7dcb794b
commit
8eadacda33
7 changed files with 88 additions and 30 deletions
|
@ -49,7 +49,7 @@ impl FormatNodeRule<ExprSubscript> for FormatExprSubscript {
|
|||
let result = if let Expr::Tuple(tuple) = slice.as_ref() {
|
||||
tuple
|
||||
.format()
|
||||
.with_options(TupleParentheses::Subscript)
|
||||
.with_options(TupleParentheses::Preserve)
|
||||
.fmt(f)
|
||||
} else {
|
||||
slice.format().fmt(f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue