mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 14:00:51 -05:00
Add test case for walrus operators in return types (#6438)
## Summary Closes https://github.com/astral-sh/ruff/issues/6437. ## Test Plan `cargo test`
This commit is contained in:
@@ -49,6 +49,7 @@ impl NeedsParentheses for ExprNamedExpr {
|
||||
|| parent.is_expr_await()
|
||||
|| parent.is_stmt_delete()
|
||||
|| parent.is_stmt_for()
|
||||
|| parent.is_stmt_function_def()
|
||||
{
|
||||
OptionalParentheses::Always
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user