From 230c93459f1073ba5fbae37d7da103d9b411c50f Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Tue, 31 Oct 2023 21:06:17 +0900 Subject: [PATCH] Delete redundant branch in `NeedsParentheses` (#8377) --- crates/ruff_python_formatter/src/expression/expr_attribute.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/ruff_python_formatter/src/expression/expr_attribute.rs b/crates/ruff_python_formatter/src/expression/expr_attribute.rs index 8bf5878ff4..66c673fcb6 100644 --- a/crates/ruff_python_formatter/src/expression/expr_attribute.rs +++ b/crates/ruff_python_formatter/src/expression/expr_attribute.rs @@ -150,8 +150,6 @@ impl NeedsParentheses for ExprAttribute { OptionalParentheses::Multiline } else if context.comments().has_dangling(self) { OptionalParentheses::Always - } else if self.value.is_name_expr() { - OptionalParentheses::BestFit } else if is_expression_parenthesized( self.value.as_ref().into(), context.comments().ranges(),