Why would `result` be `None` below? ```@task async...
# ask-community
m
Why would
result
be
None
below?
Copy code
@task
async def test() -> str:
    return "I'm an async function"

@flow
async def main() -> None:
    future = await test.submit()
    state = await future.get_state()
    result = state.result()
    print(result)

if __name__ == "__main__":
    asyncio.run(main())
Ah nevermind this is the correct syntax
Copy code
@task
async def test() -> str:
    return "I'm an async function"

@flow
async def main() -> None:
    future = await test.submit()
    result = await future.result()
    state = await future.get_state()
    print(result)

if __name__ == "__main__":
    asyncio.run(main())
🙌 1