Update a function’s name and optionally set its docstring.Can be used either as a decorator with keyword arguments or as a direct function.Args:
func: The function to update (optional). If provided, updates are applied directly.
If not provided, returns a decorator.
name: The new name for the function (optional). If provided, must not be empty.
description: Optional docstring for the functionExample:
Pydantic AI doesn’t catch errors except for ModelRetry, so we need to make
sure we catch them ourselves and raise a ModelRetry instead.Parent Module:utilities