Respect indent when measuring with MeasureMode::AllLines (#6120)
This commit is contained in:
committed by
Charlie Marsh
parent
9574ff3dc7
commit
6bf6646c5d
@@ -75,7 +75,7 @@ impl FormatNodeRule<ExprAttribute> for FormatExprAttribute {
|
||||
impl NeedsParentheses for ExprAttribute {
|
||||
fn needs_parentheses(
|
||||
&self,
|
||||
parent: AnyNodeRef,
|
||||
_parent: AnyNodeRef,
|
||||
context: &PyFormatContext,
|
||||
) -> OptionalParentheses {
|
||||
// Checks if there are any own line comments in an attribute chain (a.b.c).
|
||||
@@ -88,7 +88,7 @@ impl NeedsParentheses for ExprAttribute {
|
||||
{
|
||||
OptionalParentheses::Always
|
||||
} else {
|
||||
self.value.needs_parentheses(parent, context)
|
||||
self.value.needs_parentheses(self.into(), context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user