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)
| 59 | |
| 60 | |
| 61 | def _is_path_key(key: str) -> bool: |
| 62 | """Check if a dict key represents a file path field. |
| 63 | |
| 64 | Matches keys like 'path', 'clone_path', 'caller_file_path', and also |
| 65 | Cypher-aliased keys like 'f.path', 'n.caller_file_path'. |
| 66 | """ |
| 67 | # Strip Cypher alias prefix (e.g. "f.path" -> "path") |
| 68 | bare = key.rsplit(".", 1)[-1] if "." in key else key |
| 69 | return bare == "path" or bare.endswith("_path") |
| 70 | |
| 71 | |
| 72 | def _strip_path_value(value): |
no outgoing calls
no test coverage detected