robokudo.annotators.lambda_function

Lambda function annotator for RoboKudo.

This module provides an annotator for executing arbitrary functions. It supports:

  • Dynamic function execution

  • Custom function arguments

  • Flexible parameter passing

  • Generic function handling

The module is used for:

  • Custom processing

  • Dynamic behavior

  • Testing and debugging

  • Quick prototyping

Classes

LambdaFunctionAnnotator

Annotator for executing arbitrary functions.

Module Contents

class robokudo.annotators.lambda_function.LambdaFunctionAnnotator(name: str = 'LambdaFunctionAnnotator', descriptor: LambdaFunctionAnnotator = Descriptor())

Bases: robokudo.annotators.core.BaseAnnotator

Annotator for executing arbitrary functions.

This annotator executes a provided function with configurable arguments, allowing for dynamic behavior definition without creating new annotator classes.

class Descriptor

Bases: robokudo.annotators.core.BaseAnnotator.Descriptor

Configuration descriptor for lambda function annotator.

class Parameters

Parameter container for function configuration.

func: typing_extensions.Optional[typing_extensions.Callable] = None
func_args: typing_extensions.Optional[typing_extensions.Tuple] = None
func_kwargs: typing_extensions.Optional[typing_extensions.Dict] = None
parameters
update() py_trees.common.Status

Execute the configured function.

The function is called with the annotator instance as first argument, followed by any configured positional and keyword arguments.

Returns:

SUCCESS status