Skip to content

Wrong signature for push_request #215

Description

@sk-

Task.push_request is currently typed as

def push_request(self, *args: _P.args, **kwargs: _P.kwargs) -> None: ...

However, the method is meant accept any arguments, as those are passed to the Context class. See the definition

https://github.com/celery/celery/blob/fe573ea3bb9ebe36807a328762eff9566a287bd5/celery/app/task.py#L1154-L1155

One valid use case for push_request that is currently flagged by the types is

_test_task.push_request(delivery_info={"routing_key": "test_queue"})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions