Skip to content

async-function-with-timeout (ASYNC109) - false positive on overridden methods #24630

@DetachHead

Description

@DetachHead

Summary

Playground

from abc import ABC, abstractmethod
from typing import override


class Foo(ABC):
    @abstractmethod
    async def foo(self, timeout: float): ...  # noqa: ASYNC109 some 3rd party module that i don't control


class Bar(Foo):
    @override
    async def foo(self, timeout: float): ... # error: Async function definition with a `timeout` parameter

since changing the signature on the overridden method will result in the override being invalid, the error should not be reported here.

for comparison, other rules such as FBT001 correctly ignore methods with the @override decorator.

Version

0.15.10

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions