MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / selected_by_name

Function selected_by_name

misc/python/materialize/util.py:132–141  ·  view source on GitHub ↗
(selected: list[str], objs: list[U])

Source from the content-addressed store, hash-verified

130
131
132def selected_by_name(selected: list[str], objs: list[U]) -> Iterator[U]:
133 for name in selected:
134 for obj in objs:
135 if obj.name == name:
136 yield obj
137 break
138 else:
139 raise ValueError(
140 f"Unknown object with name {name} in {[obj.name for obj in objs]}"
141 )
142
143
144@dataclass

Callers 5

workflow_defaultFunction · 0.90
workflow_defaultFunction · 0.90
workflow_defaultFunction · 0.90
workflow_defaultFunction · 0.90
workflow_defaultFunction · 0.90

Calls 1

ValueErrorClass · 0.85

Tested by

no test coverage detected