mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 04:19:18 +00:00
Introduce Token element (#7048)
This commit is contained in:
parent
2f3a950f6f
commit
c05e4628b1
78 changed files with 733 additions and 723 deletions
|
@ -52,8 +52,8 @@ impl FormatNodeRule<StmtWith> for FormatStmtWith {
|
|||
f,
|
||||
[
|
||||
item.is_async
|
||||
.then_some(format_args![text("async"), space()]),
|
||||
text("with"),
|
||||
.then_some(format_args![token("async"), space()]),
|
||||
token("with"),
|
||||
space()
|
||||
]
|
||||
)?;
|
||||
|
@ -92,7 +92,7 @@ impl FormatNodeRule<StmtWith> for FormatStmtWith {
|
|||
item.format().fmt(f)?;
|
||||
}
|
||||
} else {
|
||||
f.join_with(format_args![text(","), space()])
|
||||
f.join_with(format_args![token(","), space()])
|
||||
.entries(item.items.iter().formatted())
|
||||
.finish()?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue