mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-20 11:21:18 +08:00
Handling of star_expr and some async issues.
This commit is contained in:
@@ -8,6 +8,9 @@ async def foo():
|
||||
await bar()
|
||||
#: E901
|
||||
yield from []
|
||||
return
|
||||
#: E901
|
||||
return ''
|
||||
|
||||
|
||||
# With decorator it's a different statement.
|
||||
@@ -17,3 +20,6 @@ async def foo():
|
||||
await bar()
|
||||
#: E901
|
||||
yield from []
|
||||
return
|
||||
#: E901
|
||||
return ''
|
||||
|
||||
@@ -99,6 +99,12 @@ def test_python_exception_matches(code):
|
||||
('async def bla():\n def x(): await bla()', '3.5'),
|
||||
('yield from []', '3.5'),
|
||||
('async def foo(): yield from []', '3.5'),
|
||||
('async def foo():\n yield x\n return 1', '3.6'),
|
||||
('async def foo():\n yield x\n return 1', '3.6'),
|
||||
('*a, *b = 3, 3', '3.3'),
|
||||
('*a = 3', '3.5'),
|
||||
('del *a, b', '3.5'),
|
||||
('async def foo():\n def nofoo():[x async for x in []]', '3.6'),
|
||||
]
|
||||
)
|
||||
def test_python_exception_matches_version(code, version):
|
||||
|
||||
Reference in New Issue
Block a user