Preserve yield parentheses (#6766)

This commit is contained in:
Micha Reiser 2023-08-22 12:27:20 +02:00 committed by GitHub
parent b52cc84df6
commit ccac9681e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 121 additions and 16 deletions

View file

@ -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 {