mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
Force parentheses for named expressions in more contexts (#6494)
See: https://github.com/astral-sh/ruff/pull/6436#issuecomment-1673583888.
This commit is contained in:
@@ -44,6 +44,9 @@ impl NeedsParentheses for ExprNamedExpr {
|
||||
|| parent.is_stmt_return()
|
||||
|| parent.is_except_handler_except_handler()
|
||||
|| parent.is_with_item()
|
||||
|| parent.is_expr_yield()
|
||||
|| parent.is_expr_yield_from()
|
||||
|| parent.is_expr_await()
|
||||
|| parent.is_stmt_delete()
|
||||
|| parent.is_stmt_for()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user