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

Function cases_b

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

Source from the content-addressed store, hash-verified

255
256
257def cases_b(root: Path) -> list[Case]:
258 out: list[Case] = []
259 assets = root / "assets"
260 if not assets.is_dir():
261 return out
262 for p in sorted(assets.glob("*.css.liquid")):
263 rel = _rel(root, p)
264 out.extend((rel, line, key) for line, key in css_selectors(_read(p)))
265 for p in sorted(assets.glob("*.js.liquid")):
266 rel = _rel(root, p)
267 text = mask_inactive(_read(p))
268 ln = _Lines(text)
269 for m in re.finditer(r"\b(?:function|class)\s+(?!extends\b)([A-Za-z_$][\w$]*)", text):
270 out.append((rel, ln.of(m.start()), m.group(1)))
271 return out
272
273
274_DEFINE = re.compile(r"""customElements\s*\.\s*define\s*\(\s*(['"])([\w-]+)\1""")

Callers 1

measureFunction · 0.85

Calls 7

mask_inactiveFunction · 0.85
_LinesClass · 0.85
ofMethod · 0.80
_relFunction · 0.70
css_selectorsFunction · 0.70
_readFunction · 0.70
startMethod · 0.45

Tested by

no test coverage detected