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

Function close

graphify/extract.py:4788–4796  ·  view source on GitHub ↗
(heads: list[tuple[int, int]], endif_start: int)

Source from the content-addressed store, hash-verified

4786 stack: list[list[tuple[int, int]]] = []
4787
4788 def close(heads: list[tuple[int, int]], endif_start: int) -> None:
4789 bodies = [(heads[k][1], heads[k + 1][0] if k + 1 < len(heads) else endif_start)
4790 for k in range(len(heads))]
4791 kept: list[int] = []
4792 for k in range(len(bodies)):
4793 if keep(k, bodies, kept):
4794 kept.append(k)
4795 else:
4796 blank(*bodies[k])
4797
4798 for start, end, word in directives:
4799 blank(start, end)

Callers 1

Calls 2

blankFunction · 0.85
keepFunction · 0.70

Tested by

no test coverage detected