MCPcopy Index your code
hub / github.com/python/cpython / _is_subpath

Function _is_subpath

Lib/profiling/sampling/heatmap_collector.py:146–151  ·  view source on GitHub ↗
(file_path, parent_path)

Source from the content-addressed store, hash-verified

144
145
146def _is_subpath(file_path, parent_path):
147 try:
148 file_path.relative_to(parent_path)
149 return True
150 except (ValueError, OSError):
151 return False
152
153
154def _path_to_module(path):

Callers 1

extract_module_nameFunction · 0.85

Calls 1

relative_toMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…