<#1268 docs: fix _Condition docstring example to u...
# flyte-github
a
#1268 docs: fix _Condition docstring example to use .aio() in async task Pull request opened by ppiegaze The
_Condition
class docstring (which surfaces in the API reference) shows: condition = await flyte.new_condition(name="my_condition", ...) result = await condition.wait() But
new_condition
and
_Condition.wait
are
@syncify
— the bare call is sync (returns the value, not an awaitable), so
await flyte.new_condition(...)
/
await condition.wait()
raise
TypeError
inside an
async def
task. The correct async form is `.aio()`: condition = await flyte.new_condition.aio(name="my_condition", ...) result = await condition.wait.aio() This matches
examples/advanced/conditions.py
and the auto-generated "use
.aio()
to call asynchronously" note. Docs-only (docstring); no behavior change. Surfaced while writing the External conditions user-guide page (unionai-docs#1087); the page had copied this same pattern. 🤖 Generated with Claude Code flyteorg/flyte-sdk