Skip to content

Type checker error #577

@arnaud-secondlayer

Description

@arnaud-secondlayer

I have the following code which is very similar to the common example.
I'm using ty as my type checker and it returns this error.
I can't find a solution to fix this error, anybody managed to fix this?

No overload of bound method `kiq` matches arguments (ty no-matching-overload)
import asyncio

from taskiq_redis import ListQueueBroker, RedisAsyncResultBackend
from taskiq.serializers import MSGPackSerializer

url = "redis://127.0.0.1:6379"
broker = ListQueueBroker(url=url).with_result_backend(RedisAsyncResultBackend(url, serializer=MSGPackSerializer()))


@broker.task
async def my_task(a: int, b: int) -> None:
    print("AB", a + b)


async def main():
    await broker.startup()

    await my_task.kiq(1, 2)

    await broker.shutdown()


if __name__ == "__main__":
    asyncio.run(main())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions