mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Fix build (#7437)
This commit is contained in:
parent
916dd5b7fa
commit
c907317199
3 changed files with 23 additions and 10 deletions
|
@ -43,7 +43,11 @@ impl FormatNodeRule<ExprSubscript> for FormatExprSubscript {
|
|||
);
|
||||
|
||||
let format_inner = format_with(|f: &mut PyFormatter| {
|
||||
if is_expression_parenthesized(value.into(), f.context().source()) {
|
||||
if is_expression_parenthesized(
|
||||
value.into(),
|
||||
f.context().comments().ranges(),
|
||||
f.context().source(),
|
||||
) {
|
||||
value.format().with_options(Parentheses::Always).fmt(f)
|
||||
} else {
|
||||
match value.as_ref() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue