MCPcopy
hub / github.com/IBM/AssetOpsBench / _names

Function _names

src/mcphub/workflows.py:58–66  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

56
57
58def _names(value):
59 if isinstance(value, dict):
60 for key in ("sensors", "names", "data", "items"):
61 if key in value:
62 return _names(value[key])
63 return list(value.keys())
64 if isinstance(value, list):
65 return [v if isinstance(v, str) else v.get("name", str(v)) for v in value]
66 return [value]

Callers 1

sensor_inventory_gapFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected