Formatter comment handling nits (#6339)
This commit is contained in:
@@ -1270,7 +1270,6 @@ impl<'a, 'print> FitsMeasurer<'a, 'print> {
|
||||
MeasureMode::FirstLine => return Fits::Yes,
|
||||
MeasureMode::AllLines => {
|
||||
self.state.line_width = 0;
|
||||
self.state.pending_indent = args.indention();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,12 +152,10 @@ impl Format<PyFormatContext<'_>> for FormatTrailingComments<'_> {
|
||||
write!(
|
||||
f,
|
||||
[
|
||||
line_suffix(&format_with(|f| {
|
||||
write!(
|
||||
f,
|
||||
[empty_lines(lines_before_comment), format_comment(trailing)]
|
||||
)
|
||||
})),
|
||||
line_suffix(&format_args![
|
||||
empty_lines(lines_before_comment),
|
||||
format_comment(trailing)
|
||||
]),
|
||||
expand_parent()
|
||||
]
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user