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
|
@ -15,7 +15,7 @@ impl FormatNodeRule<StmtDelete> for FormatStmtDelete {
|
|||
fn fmt_fields(&self, item: &StmtDelete, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
let StmtDelete { range: _, targets } = item;
|
||||
|
||||
write!(f, [text("del"), space()])?;
|
||||
write!(f, [token("del"), space()])?;
|
||||
|
||||
match targets.as_slice() {
|
||||
[] => {
|
||||
|
@ -27,9 +27,9 @@ impl FormatNodeRule<StmtDelete> for FormatStmtDelete {
|
|||
// del (
|
||||
// # Dangling comment
|
||||
// )
|
||||
text("("),
|
||||
token("("),
|
||||
block_indent(&dangling_node_comments(item)),
|
||||
text(")"),
|
||||
token(")"),
|
||||
]
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue