Skip to content

Commit

Permalink
Fix name of experimental feature message function
Browse files Browse the repository at this point in the history
Signed-off-by: Alice Purcell <[email protected]>
  • Loading branch information
alicederyn committed Sep 5, 2024
1 parent d13e057 commit 4d247fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hera/workflows/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.'
Expand All @@ -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)
)


Expand Down Expand Up @@ -775,7 +775,7 @@ def task_wrapper(*args, **kwargs) -> Union[FuncR, Step, Task, None]:
if not _flag_enabled(_DECORATOR_SYNTAX_FLAG):
raise SyntaxError(

Check warning on line 776 in src/hera/workflows/script.py

View check run for this annotation

Codecov / codecov/patch

src/hera/workflows/script.py#L776

Added line #L776 was not covered by tests
"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 = [
Expand Down

0 comments on commit 4d247fd

Please sign in to comment.