Skip to main content

resolve_python_absolute

Function resolve_python_absolute 

pub fn resolve_python_absolute<S: BuildHasher>(
    target: &str,
    live_paths: &HashSet<String, S>,
) -> Option<String>
Expand description

Resolve an absolute Python module path (mypkg.utils, os) to a tracked file by matching the dotted path as a repo-path suffix (a/b/c.py or a/b/c/__init__.py) against the live-at-HEAD set — Python has no explicit import root, so the module may live under any source prefix. The match must be unique: zero or more than one candidate yields None, so an ambiguous suffix never fabricates a false edge and stdlib / third-party modules (no tracked file) resolve to None.