mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
Preserve yield parentheses (#6766)
This commit is contained in:
parent
b52cc84df6
commit
ccac9681e1
6 changed files with 121 additions and 16 deletions
|
@ -90,7 +90,7 @@ impl Format<PyFormatContext<'_>> for AnyExpressionYield<'_> {
|
|||
[
|
||||
text(keyword),
|
||||
space(),
|
||||
maybe_parenthesize_expression(val, self, Parenthesize::IfRequired)
|
||||
maybe_parenthesize_expression(val, self, Parenthesize::Optional)
|
||||
]
|
||||
)?;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue