mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-11 22:28:27 +00:00
Fix broken is_expression_parenthesized
call from rebase (#7442)
This commit is contained in:
parent
7e2eba2592
commit
aae02cf275
1 changed files with 5 additions and 1 deletions
|
@ -34,7 +34,11 @@ impl NeedsParentheses for ExprAwait {
|
|||
) -> OptionalParentheses {
|
||||
if parent.is_expr_await() {
|
||||
OptionalParentheses::Always
|
||||
} else if is_expression_parenthesized(self.value.as_ref().into(), context.source()) {
|
||||
} else if is_expression_parenthesized(
|
||||
self.value.as_ref().into(),
|
||||
context.comments().ranges(),
|
||||
context.source(),
|
||||
) {
|
||||
OptionalParentheses::Never
|
||||
} else {
|
||||
self.value.needs_parentheses(self.into(), context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue