-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Milestone
Description
Checklist
- I have checked the issues list
for similar or identical feature requests. - I have checked the pull requests list
for existing proposed implementations of this feature. - I have checked the commit log
to find out if the if the same feature was already implemented in the
master branch. - I have included all related issues and possible duplicate issues
in this issue (If there are none, check this box anyway).
Related Issues and Possible Duplicates
Related Issues
- None
Possible Duplicates
- None
Brief Summary
Design
Architectural Considerations
None
Proposed Behavior
Celery tasks created with @app.task should support typing.get_type_hints(my_celery_task).
It can be solved by copying the __annotations__ from the decorated function when available. This is done by functools.wraps() in Python 3.0+, if I understand PEP 3107 correctly. Without this typing.get_type_hints(my_celery_task) raises an exception.
It is my understanding that some other similar properties that functools.wraps handles are already copied:
Lines 453 to 454 in d3863d9
| '__doc__': fun.__doc__, | |
| '__module__': fun.__module__, |
Proposed UI/UX
Diagrams
N/A
Alternatives
None
Reactions are currently unavailable