unwrap format_body

This commit is contained in:
Brent Westbrook 2025-12-11 15:43:00 -05:00
parent 00745159d1
commit 3dfda9f6cc
No known key found for this signature in database
1 changed files with 50 additions and 54 deletions

View File

@ -360,7 +360,6 @@ impl Format<PyFormatContext<'_>> for FormatBody<'_> {
.unwrap_or(dangling.len()),
);
let fmt_body = format_with(|f: &mut PyFormatter| {
// If the body is parenthesized and has its own leading comments, preserve the
// separation between the dangling lambda comments and the body comments. For example,
// preserve this comment positioning:
@ -415,8 +414,5 @@ impl Format<PyFormatContext<'_>> for FormatBody<'_> {
]
)
}
});
fmt_body.fmt(f)
}
}