cuddly-jelly-27016
05/22/2025, 12:09 AMautomodule directive, and any function that is using the task or workflow decorators is not properly being associated with the module.
### Expected behavior
Automodule directive should work with functions decorated with task or workflow decorators.
### Additional context to reproduce
If I have a file in project/example.py
from flytekit import task, workflow
@task
def example_task(x: int) -> int:
"""My test task.
Args:
x: Integer for test
"""
return x
@workflow
def example_workflow(x: int) -> int:
return example_task(x=x)
Usually I can have Sphinx document these functions with:
.. automodule:: project.example
However, the task/workflow functions are not getting picked up by Sphinx. If I reference the object directly with:
.. autoclass:: project.example.example_task
Sphinx can find the example_task and properly document it using autodoc.
### Screenshots
No response
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/22/2025, 12:09 AM