mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Maybe parenthesize long constants and names (#6816)
This commit is contained in:
parent
e4c13846e3
commit
04a9a8dd03
20 changed files with 357 additions and 368 deletions
|
@ -69,7 +69,10 @@ impl NeedsParentheses for ExprCall {
|
|||
{
|
||||
OptionalParentheses::Multiline
|
||||
} else {
|
||||
self.func.needs_parentheses(self.into(), context)
|
||||
match self.func.needs_parentheses(self.into(), context) {
|
||||
OptionalParentheses::BestFit => OptionalParentheses::Never,
|
||||
parentheses => parentheses,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue