MCPcopy Create free account
hub / github.com/StackStorm/st2 / _cast

Function _cast

st2common/st2common/util/param.py:75–87  ·  view source on GitHub ↗
(v, parameter_schema)

Source from the content-addressed store, hash-verified

73
74
75def _cast(v, parameter_schema):
76 if v is None or not parameter_schema:
77 return v
78
79 parameter_type = parameter_schema.get("type", None)
80 if not parameter_type:
81 return v
82
83 cast = get_cast(cast_type=parameter_type)
84 if not cast:
85 return v
86
87 return cast(v)
88
89
90def _create_graph(action_context, config):

Callers 2

_cast_paramsFunction · 0.85
_cast_params_fromFunction · 0.85

Calls 2

get_castFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected