Files
openide/python/testData/highlighting/asyncForInNonAsyncFunction.py
Alex Grönholmandintellij-monorepo-bot 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

13 lines
246 B
Python

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