mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
Introduce Token element (#7048)
This commit is contained in:
parent
2f3a950f6f
commit
c05e4628b1
78 changed files with 733 additions and 723 deletions
|
@ -27,7 +27,7 @@ impl FormatNodeRule<StmtAssign> for FormatStmtAssign {
|
|||
[
|
||||
first.format(),
|
||||
space(),
|
||||
text("="),
|
||||
token("="),
|
||||
space(),
|
||||
FormatTargets { targets: rest }
|
||||
]
|
||||
|
@ -89,9 +89,9 @@ impl Format<PyFormatContext<'_>> for FormatTargets<'_> {
|
|||
write!(
|
||||
f,
|
||||
[
|
||||
if_group_breaks(&text("(")),
|
||||
if_group_breaks(&token("(")),
|
||||
soft_block_indent(&first.format().with_options(Parentheses::Never)),
|
||||
if_group_breaks(&text(")"))
|
||||
if_group_breaks(&token(")"))
|
||||
]
|
||||
)
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ impl Format<PyFormatContext<'_>> for FormatTargets<'_> {
|
|||
[group(&format_args![
|
||||
format_first,
|
||||
space(),
|
||||
text("="),
|
||||
token("="),
|
||||
space(),
|
||||
FormatTargets { targets: rest }
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue