mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
Introduce Token element (#7048)
This commit is contained in:
parent
2f3a950f6f
commit
c05e4628b1
78 changed files with 733 additions and 723 deletions
|
@ -87,14 +87,14 @@ impl Format<PyFormatContext<'_>> for AnyExpressionYield<'_> {
|
|||
write!(
|
||||
f,
|
||||
[
|
||||
text(keyword),
|
||||
token(keyword),
|
||||
space(),
|
||||
maybe_parenthesize_expression(val, self, Parenthesize::Optional)
|
||||
]
|
||||
)?;
|
||||
} else {
|
||||
// ExprYieldFrom always has Some(value) so we should never get a bare `yield from`
|
||||
write!(f, [&text(keyword)])?;
|
||||
write!(f, [&token(keyword)])?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue