mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
Formatter comment handling nits (#6339)
This commit is contained in:
parent
1031bb6550
commit
f4831d5a26
2 changed files with 4 additions and 7 deletions
|
@ -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()
|
||||
]
|
||||
)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue