Files
vscode/extensions/copilot/test/simulation/fixtures/notebook/fixing/fixing3.ipynb
T
kieferrmandcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> 333d9a4053 Hello Copilot
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-06-27 11:35:20 +02:00

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("")