omnipy.compute.helpers
| CLASS | DESCRIPTION |
|---|---|
Void |
Empty sync/async iterable for signature-only generator flow bodies. |
| FUNCTION | DESCRIPTION |
|---|---|
create_data_class_task_name |
|
is_func_arg_template_child |
|
underscore_data_class_name |
|
Void
Empty sync/async iterable for signature-only generator flow bodies.
Use this when a flow template body exists only to define a generator or async-generator callable signature, while the child jobs perform the actual work.
Examples:
@LinearFlowTemplate(task_one, generator_task_two) def my_sync_generator_flow(number: int) -> Generator[int, None, None]: yield from Void() # For generator signature only; never run.
@DagFlowTemplate(task_one, generator_task_two) async def my_async_generator_flow(number: int) -> AsyncGenerator[int, None]: async for _ in Void(): # For generator signature only; never run. yield _
Referenced by:
Source code in src/omnipy/compute/helpers.py
create_data_class_task_name
Source code in src/omnipy/compute/helpers.py
is_func_arg_template_child
is_func_arg_template_child(child: object) -> TypeGuard[IsFuncArgJobTemplate]