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

Function cases_c

scripts/theme_gate.py:290–303  ·  view source on GitHub ↗
(root: Path)

Source from the content-addressed store, hash-verified

288
289
290def cases_c(root: Path) -> list[Case]:
291 defined = _defined_elements(root)
292 out: list[Case] = []
293 if not defined:
294 return out
295 for p in _liquid_files(root):
296 masked = mask_inactive(_read(p))
297 ln = _Lines(masked)
298 rel = _rel(root, p)
299 for m in re.finditer(r"""<([a-z][\w]*(?:-[\w]+)+)|\bis\s*=\s*(['"])([a-z][\w]*(?:-[\w]+)+)\2""", masked):
300 name = m.group(1) or m.group(3)
301 if name in defined:
302 out.append((rel, ln.of(m.start()), name))
303 return out
304
305
306_SETTING = re.compile(

Callers 1

measureFunction · 0.85

Calls 8

_defined_elementsFunction · 0.85
_liquid_filesFunction · 0.85
mask_inactiveFunction · 0.85
_LinesClass · 0.85
ofMethod · 0.80
_readFunction · 0.70
_relFunction · 0.70
startMethod · 0.45

Tested by

no test coverage detected