From 4d247fd7c456aeec06b8ec81102fb2fe37947a5d Mon Sep 17 00:00:00 2001 From: Alice Purcell Date: Thu, 5 Sep 2024 18:55:39 +0100 Subject: [PATCH] Fix name of experimental feature message function Signed-off-by: Alice Purcell --- src/hera/workflows/script.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hera/workflows/script.py b/src/hera/workflows/script.py index e62f46c8d..86c32306f 100644 --- a/src/hera/workflows/script.py +++ b/src/hera/workflows/script.py @@ -379,7 +379,7 @@ def _get_parameters_from_callable(source: Callable) -> List[Parameter]: return parameters -def please_enable_experimental_feature(flag: str) -> str: +def _enable_experimental_feature_msg(flag: str) -> str: return ( "Please turn on experimental features by setting " f'`hera.shared.global_config.experimental_features["{flag}"] = True`.' @@ -391,7 +391,7 @@ def _assert_pydantic_io_enabled(annotation: str) -> None: if not _flag_enabled(_SCRIPT_PYDANTIC_IO_FLAG): raise ValueError( f"Unable to instantiate {annotation} since it is an experimental feature. " - + please_enable_experimental_feature(_SCRIPT_PYDANTIC_IO_FLAG) + + _enable_experimental_feature_msg(_SCRIPT_PYDANTIC_IO_FLAG) ) @@ -775,7 +775,7 @@ def task_wrapper(*args, **kwargs) -> Union[FuncR, Step, Task, None]: if not _flag_enabled(_DECORATOR_SYNTAX_FLAG): raise SyntaxError( "Cannot pass a Pydantic type inside a context. " - + please_enable_experimental_feature(_DECORATOR_SYNTAX_FLAG) + + _enable_experimental_feature_msg(_DECORATOR_SYNTAX_FLAG) ) arguments = args[0]._get_as_arguments() arguments_list = [