Files
openide/python/testData/highlighting/asyncSetComprehensionInNonAsyncFunction.py
Alex Grönholm bbd3eed580 PY-79522: Highlight syntax errors for misplaced "async with", "async for" and async list/set/dict comprehensions
# Conflicts:
#	community/python/python-psi-impl/src/com/jetbrains/python/validation/PyAsyncAwaitAnnotator.java

GitOrigin-RevId: 125a714f769ac93c8516250ae5b92afff14518f0
2025-03-12 18:13:55 +00:00

11 lines
226 B
Python

import asyncio
async def genfunc():
yield 1
def example():
{x <error descr="'async for' outside async function">async<caret></error> for x in genfunc()}
async def example_correct():
{x async for x in genfunc()}