The below Python 3.12 code with ruff==0.5.2:
import asyncio
async def foo(timeout: float | None = 30.0) -> None:
async with asyncio.timeout(timeout):
await asyncio.sleep(1.0)
Will throw an ASYNC109 error on the third line:
a.py:3:15: ASYNC109 Async function definition with a `timeout` parameter
I think this is a false positive, as later on the timeout is directly used in an asyncio.timeout.
Is there some way Ruff can check for how the timeout is used before throwing ASYNC109?
The below Python 3.12 code with
ruff==0.5.2:Will throw an ASYNC109 error on the third line:
I think this is a false positive, as later on the
timeoutis directly used in anasyncio.timeout.Is there some way Ruff can check for how the
timeoutis used before throwing ASYNC109?