MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / _is_path_key

Function _is_path_key

src/codegraphcontext/server.py:48–56  ·  view source on GitHub ↗

Check if a dict key represents a file path field. Matches keys like 'path', 'clone_path', 'caller_file_path', and also Cypher-aliased keys like 'f.path', 'n.caller_file_path'.

(key: str)

Source from the content-addressed store, hash-verified

46
47
48def _is_path_key(key: str) -> bool:
49 """Check if a dict key represents a file path field.
50
51 Matches keys like 'path', 'clone_path', 'caller_file_path', and also
52 Cypher-aliased keys like 'f.path', 'n.caller_file_path'.
53 """
54 # Strip Cypher alias prefix (e.g. "f.path" -> "path")
55 bare = key.rsplit(".", 1)[-1] if "." in key else key
56 return bare == "path" or bare.endswith("_path")
57
58
59def _strip_path_value(value):

Callers 1

_strip_workspace_prefixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected