11 ms·
While it's of course not ideal, stub files can help with this issue. For example you can get stubs for Celery that make both `shared_task` and `delay` properly
by henbruas 4y ago
While it's of course not ideal, stub files can help with this issue. For example you can get stubs for Celery that make both `shared_task` and `delay` properly typed: https://github.com/sbdchd/celery-types https://github.com/sbdchd/celery-types
- matsemann 4y agoOnly since 3.10, though, before that it was actually impossible to type the decorators correctly.
- dragonwriter 4y ago> Only since 3.10, though, before that it was actually impossible to type the decorators correctly. There were type gymnastics you could do using overloads to reach any arbitrary level of coverage, but it was ugly and always short of fully general.