mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-18 21:36:52 +01:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
786 B
786 B
In [ ]:
# This sample validates that "async" is flagged as an error when
# used in inappropriate locations.
from contextlib import AsyncExitStack
async def b():
for i in range(5):
yield i
cm = AsyncExitStack()
def func1():
# This should generate an error because
# "async" cannot be used in a non-async function.
async for x in b():
print("")