dffml
dffml copied to clipboard
df: base: op: Support single output without auto-defined I/O
478 if auto_def_outputs and len(self.parent.op.outputs) == 1:
479 if inspect.isasyncgen(result):
480
481 async def convert_asyncgen(outputs):
482 async for yielded_output in outputs:
483 yield {
484 list(self.parent.op.outputs.keys())[
485 0
486 ]: yielded_output
487 }
488
489 result = convert_asyncgen(result)
490 elif result is not None and valid_return_none:
491 result = {
492 list(self.parent.op.outputs.keys())[0]: result
493 }