diff --git a/hamilton/function_modifiers/macros.py b/hamilton/function_modifiers/macros.py index 9855df78f..69a1f52df 100644 --- a/hamilton/function_modifiers/macros.py +++ b/hamilton/function_modifiers/macros.py @@ -1113,6 +1113,15 @@ def __init__( _chain: bool = False, **mutating_function_kwargs: Union[SingleDependency, Any], ): + """Instantiates a `@mutate` decorator. + + We assume the first argument of the decorated function to be the output of the function we are targeting. + + :param target_functions: functions we wish to mutate the output of + :param collapse: Whether to collapse this into a single node. This is not currently supported. + :param _chain: Whether to chain the first parameter. This is the only mode that is supported. Furthermore, this is not externally exposed. @flow will make use of this. + :param **mutating_function_kwargs: other kwargs that the decorated function has + """ self.collapse = collapse self.chain = _chain # keeping it here once it gets implemented maybe nice to have options