mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 02:13:08 +00:00
parent
6bc1ba6d62
commit
039694aaed
5 changed files with 111 additions and 28 deletions
|
@ -150,10 +150,13 @@ impl Format<PyFormatContext<'_>> for FormatTrailingComments<'_> {
|
|||
write!(
|
||||
f,
|
||||
[
|
||||
line_suffix(&format_args![
|
||||
empty_lines(lines_before_comment),
|
||||
format_comment(trailing)
|
||||
]),
|
||||
line_suffix(
|
||||
&format_args![
|
||||
empty_lines(lines_before_comment),
|
||||
format_comment(trailing)
|
||||
],
|
||||
0
|
||||
),
|
||||
expand_parent()
|
||||
]
|
||||
)?;
|
||||
|
@ -161,7 +164,7 @@ impl Format<PyFormatContext<'_>> for FormatTrailingComments<'_> {
|
|||
write!(
|
||||
f,
|
||||
[
|
||||
line_suffix(&format_args![space(), space(), format_comment(trailing)]),
|
||||
line_suffix(&format_args![space(), space(), format_comment(trailing)], 0),
|
||||
expand_parent()
|
||||
]
|
||||
)?;
|
||||
|
@ -266,7 +269,7 @@ impl Format<PyFormatContext<'_>> for FormatDanglingOpenParenthesisComments<'_> {
|
|||
write!(
|
||||
f,
|
||||
[
|
||||
line_suffix(&format_args!(space(), space(), format_comment(comment))),
|
||||
line_suffix(&format_args!(space(), space(), format_comment(comment)), 0),
|
||||
expand_parent()
|
||||
]
|
||||
)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue