If the obj isn’t a class, it’s much cleaner, but curious if there’s still a way to make the above cleaner.
from prefect import task, flow
@task
async def test_task():
return 25
@task
async def test_task_downstream(x):
return x + 5
@flow
async def test_flow():
obj = await test_task()
return await test_task_downstream(obj)
await test_flow()