File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,15 @@ def get_description(definition: dict[str, Any]) -> str | None:
6464
6565def get_variable_names (definition : dict [str , Any ]) -> list [str ]:
6666 """Given a Workflow definition this function returns all the names of the
67- variables defined at the workflow level."""
68- wf_variable_names : set [str ] = set ()
67+ variables defined at the workflow level. This function DOES NOT deduplicate names,
68+ that is the role of the validator."""
69+ wf_variable_names : list [str ] = []
6970 variables : dict [str , Any ] | None = definition .get ("variables" )
7071 if variables :
71- for input_variable in variables .get ("inputs" , []):
72- name : str = input_variable ["name" ]
73- assert name not in wf_variable_names
74- wf_variable_names .add (name )
75- return list (wf_variable_names )
72+ wf_variable_names .extend (
73+ input_variable ["name" ] for input_variable in variables .get ("inputs" , [])
74+ )
75+ wf_variable_names .extend (
76+ output_variable ["name" ] for output_variable in variables .get ("outputs" , [])
77+ )
78+ return wf_variable_names
You can’t perform that action at this time.
0 commit comments