Closed
Description
flake8-async seems to generally handle async with
statements with multiple items incorrectly.
Below is an example demonstrating a false positive detection of ASYNC100
, but this surely affects many other rules as well (e.g. ASYNC912
)
import asyncio
async def main():
async with asyncio.timeout(1), asyncio.TaskGroup() as tg: # noqa: ASYNC100 ; false positive because tg.__aexit__ occurs within timeout scope
_ = tg.create_task(asyncio.sleep(2))
asyncio.run(main())
Metadata
Metadata
Assignees
Labels
No labels