sbdchd / celery-types

:seedling: Type stubs for Celery and its related packages
Apache License 2.0
85 stars 39 forks source link

Make more params in `task()` optional? #51

Open cktang88 opened 2 years ago

cktang88 commented 2 years ago

I believe most of the args in task() should be optional, eg. all the retry params, and acks_late, among others? https://github.com/sbdchd/celery-types/blob/71654791ce05f5a9ccc86e75b59c1579c59beeaa/celery-stubs/app/base.pyi#L110

last-partizan commented 2 years ago

Actually, all params for task are optional, it could even be used as @app.task.

I think i should be able to create PR for this.

last-partizan commented 2 years ago

I created PR for task without arguments.

But, i did nothing about optional params.

@cktang88 what are your use-case for this?

I think, current typing is correct. For example acks_late is bool, with some default value. All kwargs are optional and can be omitted.

palfrey commented 2 years ago

Ditto for shared_task