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

Function _basename

graphify/pascal_singleton_resolution.py:51–56  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

49
50
51def _basename(path: str) -> str:
52 # os.path.basename on POSIX does not split a Windows `\` separator, so a
53 # Windows-style source_file (`C:\proj\Unit.pas`) would keep the whole string
54 # as its "basename" and never match the relativised POSIX corpus path.
55 # Normalise separators first so the match works cross-platform (#5286).
56 return os.path.basename(path.replace("\\", "/"))
57
58
59def _unit_stem(source_file: str) -> str:

Callers 3

_unit_stemFunction · 0.85
_corpus_path_matcherFunction · 0.85
matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected