[parser] Flag single unparenthesized generator expr with trailing comma in arguments. (#17893)
Fixes #17867 ## Summary The CPython parser does not allow generator expressions which are the sole arguments in an argument list to have a trailing comma. With this change, we start flagging such instances. ## Test Plan Added new inline tests.
This commit is contained in:
committed by
GitHub
parent
895b6161a6
commit
f5096f2050
@@ -1,2 +1,3 @@
|
||||
sum(x for x in range(10), 5)
|
||||
total(1, 2, x for x in range(5), 6)
|
||||
sum(x for x in range(10),)
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
zip((x for x in range(10)), (y for y in range(10)))
|
||||
sum(x for x in range(10))
|
||||
sum((x for x in range(10)),)
|
||||
|
||||
Reference in New Issue
Block a user