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)
| 46 | |
| 47 | |
| 48 | def _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 | |
| 59 | def _strip_path_value(value): |
no outgoing calls
no test coverage detected