Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,15 @@ def identity(value: Any, **kwargs) -> Any:
def build_operations_chain(
operations: List[OperationDefinition], execution_context: str = "<root>"
) -> Callable[[T, Dict[str, Any]], V]:
if not len(operations):
if not operations:
return identity # return identity function
operations_functions = []
for operation_id, operation_definition in enumerate(operations):
operation_context = f"{execution_context}[{operation_id}]"
operation_function = build_operation(
operations_functions = [
build_operation(
operation_definition=operation_definition,
execution_context=operation_context,
execution_context=f"{execution_context}[{operation_id}]",
)
operations_functions.append(operation_function)
for operation_id, operation_definition in enumerate(operations)
]
return partial(chain, functions=operations_functions)


Expand Down
Loading