Skip to content

RUF006 not emitted for low-level loop.create_task #3237

@layday

Description

@layday

AFAIK, the same pitfall applies to the lower level loop.create_task:

import asyncio


async def foo():
    asyncio.create_task(bar())  # Warning here
    loop = asyncio.get_running_loop()
    loop.create_task(bar())  # No warning here

async def bar():
    pass

It would be great if ruff could support this too in some way.

Ruff version: 0.0.252

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtype-inferenceRequires more advanced type inference.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions