mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 12:55:05 +00:00
Introduce Token element (#7048)
This commit is contained in:
parent
2f3a950f6f
commit
c05e4628b1
78 changed files with 733 additions and 723 deletions
|
@ -42,11 +42,11 @@ impl FormatNodeRule<ExprConstant> for FormatExprConstant {
|
|||
} = item;
|
||||
|
||||
match value {
|
||||
Constant::Ellipsis => text("...").fmt(f),
|
||||
Constant::None => text("None").fmt(f),
|
||||
Constant::Ellipsis => token("...").fmt(f),
|
||||
Constant::None => token("None").fmt(f),
|
||||
Constant::Bool(value) => match value {
|
||||
true => text("True").fmt(f),
|
||||
false => text("False").fmt(f),
|
||||
true => token("True").fmt(f),
|
||||
false => token("False").fmt(f),
|
||||
},
|
||||
Constant::Int(_) => FormatInt::new(item).fmt(f),
|
||||
Constant::Float(_) => FormatFloat::new(item).fmt(f),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue