(loop_def, variables, connection)
| 61 | |
| 62 | |
| 63 | async def execute_loop(loop_def, variables, connection): |
| 64 | loop_var_name = loop_def['as'] |
| 65 | loop_variables = variables.copy() |
| 66 | |
| 67 | if 'over' in loop_def: |
| 68 | iterable = loop_def['over'] |
| 69 | elif 'range' in loop_def: |
| 70 | start = loop_def['range']['start'] |
| 71 | end = loop_def['range']['end'] |
| 72 | iterable = range(start, end + 1) |
| 73 | else: |
| 74 | raise ValueError("Loop must have 'over' or 'range' defined.") |
| 75 | |
| 76 | for item in iterable: |
| 77 | loop_variables[loop_var_name] = item |
| 78 | await execute_steps(loop_def['steps'], loop_variables, connection) |
| 79 | |
| 80 | |
| 81 | async def execute_step(step, variables, connection): |
no test coverage detected
searching dependent graphs…