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

Function match

graphify/pascal_singleton_resolution.py:95–106  ·  view source on GitHub ↗
(raw_path: str)

Source from the content-addressed store, hash-verified

93 by_name.setdefault(_basename(source_file).lower(), []).append(source_file)
94
95 def match(raw_path: str) -> str | None:
96 candidates = by_name.get(_basename(raw_path).lower())
97 if not candidates:
98 return None
99 if len(candidates) == 1:
100 return candidates[0]
101 normalised = raw_path.replace("\\", "/").lower()
102 tails = [
103 c for c in candidates
104 if normalised.endswith("/" + c.replace("\\", "/").lower())
105 ]
106 return tails[0] if len(tails) == 1 else None
107
108 return match
109

Callers

nothing calls this directly

Calls 2

_basenameFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected