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

Function _process_defaults

st2common/st2common/util/param.py:160–170  ·  view source on GitHub ↗

Process dependencies for parameters default values in the order schemas are defined.

(G, schemas)

Source from the content-addressed store, hash-verified

158
159
160def _process_defaults(G, schemas):
161 """
162 Process dependencies for parameters default values in the order schemas are defined.
163 """
164 for schema in schemas:
165 for name, value in six.iteritems(schema):
166 absent = name not in G.nodes
167 is_none = G.nodes.get(name, {}).get("value") is None
168 immutable = value.get("immutable", False)
169 if absent or is_none or immutable:
170 _process(G, name, value.get("default"))
171
172
173def _validate(G):

Callers 2

render_live_paramsFunction · 0.85
render_final_paramsFunction · 0.85

Calls 2

_processFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected