Skip to content

unused-async (RUF029) - false positive in .pyi files #11018

@DetachHead

Description

@DetachHead
async def foo() -> int: ... # error: Function `foo` is declared `async`, but doesn't `await` or use `async` features.

this is a stub for a function that returns Coroutine[Any, Any, int]. removing the async will result in an incorrect return type

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions