MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / active

Function active

graphify/extract.py:4070–4077  ·  view source on GitHub ↗
(index: int, choice: tuple[int, ...])

Source from the content-addressed store, hash-verified

4068 coverage["variant_count"] = len(choices)
4069
4070 def active(index: int, choice: tuple[int, ...]) -> bool:
4071 current = groups[index]
4072 while "parent" in current:
4073 parent = current["parent"]
4074 if parent in selected and choice[parent] != current["parent_branch"]:
4075 return False
4076 current = groups[parent]
4077 return True
4078
4079 coverage["views"] = [[{"group_line": groups[index]["line"], "branch": choice[index]}
4080 for index in sorted(selected) if active(index, choice)] for choice in choices]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected