mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
Introduce fake __asyncgenerator type for async generator objects described in PEP 525. Update PyFunctionImpl.createCoroutineType to convert __generator to __asyncgenerator. Update PyTargetExpressionImpl.getIterationType to infer type of elements which are getting from async generator Highlight non-empty return inside async generators as error
11 lines
182 B
Python
11 lines
182 B
Python
async def foo(x):
|
|
await x
|
|
yield x
|
|
<error descr="non-empty 'return' inside asynchronous generator">return x</error>
|
|
|
|
|
|
async def bar(x):
|
|
await x
|
|
yield x
|
|
return
|