mirror of
https://github.com/astral-sh/ruff
synced 2026-01-11 00:24:13 -05:00
Allow named expression in set comprehension: {a := b for c in d}
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
@@ -1185,7 +1185,7 @@ Atom<Goal>: ast::Expr = {
|
||||
custom: (),
|
||||
node: ast::ExprKind::Set { elts }
|
||||
},
|
||||
<location:@L> "{" <elt:Test<"all">> <generators:CompFor> "}" <end_location:@R> => {
|
||||
<location:@L> "{" <elt:NamedExpressionTest> <generators:CompFor> "}" <end_location:@R> => {
|
||||
ast::Expr {
|
||||
location,
|
||||
end_location: Some(end_location),
|
||||
|
||||
Reference in New Issue
Block a user