예제 #1
0
 def dict_to_param_spec(contexts: Dict = None):
     contexts = contexts or {}
     return {
         k: ParamSpec(
             name=k,
             param=V1Param(value=v),
             iotype=types.ANY,
             is_flag=False,
             is_list=None,
         )
         for k, v in contexts.items()
     }
 def _update_params_with_contexts(
         params: Dict[str, ParamSpec],
         contexts: Dict = None) -> Dict[str, ParamSpec]:
     contexts = contexts or {}
     contexts = {
         k: ParamSpec(
             name=k,
             param=V1Param(value=v),
             iotype=types.ANY,
             is_flag=False,
         )
         for k, v in contexts.items()
     }
     params.update(contexts)
     return params