mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-22 12:35:08 +00: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:
parent
53246b725e
commit
e91caea490
3 changed files with 20 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue