MCPcopy
hub / github.com/apache/caldera / get_variations

Function get_variations

app/objects/secondclass/c_executor.py:87–99  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

85
86
87def get_variations(data):
88 variations = []
89 if not data:
90 return []
91 for v in data:
92 if isinstance(v, Variation):
93 description = v.description
94 command = v.command
95 else:
96 description = v['description']
97 command = v['command']
98 variations.append(Variation.load(dict(description=description, command=command)))
99 return variations

Callers 1

__init__Method · 0.85

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected