Respect indent when measuring with MeasureMode::AllLines (#6120)

This commit is contained in:
Micha Reiser 2023-07-27 13:34:36 +02:00 committed by Charlie Marsh
parent 9574ff3dc7
commit 6bf6646c5d
5 changed files with 109 additions and 51 deletions

View file

@ -119,10 +119,10 @@ impl FormatNodeRule<ExprCall> for FormatExprCall {
impl NeedsParentheses for ExprCall {
fn needs_parentheses(
&self,
parent: AnyNodeRef,
_parent: AnyNodeRef,
context: &PyFormatContext,
) -> OptionalParentheses {
self.func.needs_parentheses(parent, context)
self.func.needs_parentheses(self.into(), context)
}
}