mirror of
https://github.com/davidhalter/parso.git
synced 2026-11-02 17:37:29 +08:00
Check all arguments for unparenthesized generator expressions
Previously only the first argument on the argument list checked against the generator expressions, now all argumnets are controlled.
This commit is contained in:
1 parent
6ecd975516
commit
fe54800cdd
2 files changed
+62
-53
No files matched your search
@@ -375,3 +375,15 @@ def test_repeated_kwarg():
|
||||
_get_error_list("f(q=1, q=2)", version="3.9")[0].message
|
||||
== "SyntaxError: keyword argument repeated: q"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'source', [
|
||||
'a(a for a in b,)'
|
||||
'a(a for a in b, a)',
|
||||
'a(a, a for a in b)',
|
||||
'a(a, b, a for a in b, c, d)',
|
||||
]
|
||||
)
|
||||
def test_unparenthesized_genexp(source):
|
||||
assert _get_error_list(source)
|
||||
Reference in new issue
Block a user