mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Introduce Token element (#7048)
This commit is contained in:
parent
2f3a950f6f
commit
c05e4628b1
78 changed files with 733 additions and 723 deletions
|
@ -91,7 +91,7 @@ impl FormatNodeRule<ExprSlice> for FormatExprSlice {
|
|||
if !all_simple && lower.is_some() {
|
||||
space().fmt(f)?;
|
||||
}
|
||||
text(":").fmt(f)?;
|
||||
token(":").fmt(f)?;
|
||||
// No upper node, no need for a space, e.g. `x[a() :]`
|
||||
if !all_simple && upper.is_some() {
|
||||
space().fmt(f)?;
|
||||
|
@ -125,7 +125,7 @@ impl FormatNodeRule<ExprSlice> for FormatExprSlice {
|
|||
if !all_simple && (upper.is_some() || step.is_none()) {
|
||||
space().fmt(f)?;
|
||||
}
|
||||
text(":").fmt(f)?;
|
||||
token(":").fmt(f)?;
|
||||
// No step node, no need for a space
|
||||
if !all_simple && step.is_some() {
|
||||
space().fmt(f)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue