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

Function norm

scripts/theme_gate.py:102–109  ·  view source on GitHub ↗

Normalize a node label: drop surrounding ``<>`` and a trailing ``()``.

(label: str)

Source from the content-addressed store, hash-verified

100
101
102def norm(label: str) -> str:
103 """Normalize a node label: drop surrounding ``<>`` and a trailing ``()``."""
104 s = str(label or "").strip()
105 if s.startswith("<") and s.endswith(">"):
106 s = s[1:-1]
107 if s.endswith("()"):
108 s = s[:-2]
109 return s
110
111
112class _Lines:

Callers 2

hitFunction · 0.70
measureFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected