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

Method _lines

scripts/theme_gate.py:164–172  ·  view source on GitHub ↗
(self, e: dict, src_file: str)

Source from the content-addressed store, hash-verified

162 return s[len(self.root):] if s.startswith(self.root) else s
163
164 def _lines(self, e: dict, src_file: str) -> set[int]:
165 lines: set[int] = set()
166 for ev in (e, *[a for a in (e.get("also_seen") or []) if isinstance(a, dict)]):
167 if ev is not e and ev.get("source_file") not in (None, "") and self.rel(ev["source_file"]) != src_file:
168 continue
169 m = re.fullmatch(r"L(\d+)", str(ev.get("source_location") or ""))
170 if m:
171 lines.add(int(m.group(1)))
172 return lines
173
174 def targets(self, file: str, line: int) -> list[dict]:
175 """Destination nodes of every edge seen at ``file:line``."""

Callers 1

__init__Method · 0.95

Calls 2

relMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected