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

Function _path_isabs

Lib/importlib/_bootstrap_external.py:177–182  ·  view source on GitHub ↗

Replacement for os.path.isabs.

(path)

Source from the content-addressed store, hash-verified

175
176if _MS_WINDOWS:
177 def _path_isabs(path):
178 """Replacement for os.path.isabs."""
179 if not path:
180 return False
181 root = _os._path_splitroot(path)[0].replace('/', '\\')
182 return len(root) > 1 and (root.startswith('\\\\') or root.endswith('\\'))
183
184else:
185 def _path_isabs(path):

Callers 2

_path_abspathFunction · 0.85
invalidate_cachesMethod · 0.85

Calls 3

replaceMethod · 0.45
startswithMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…