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

Function _path_abspath

Lib/importlib/_bootstrap_external.py:190–197  ·  view source on GitHub ↗

Replacement for os.path.abspath.

(path)

Source from the content-addressed store, hash-verified

188
189
190def _path_abspath(path):
191 """Replacement for os.path.abspath."""
192 if not _path_isabs(path):
193 for sep in path_separators:
194 path = path.removeprefix(f".{sep}")
195 return _path_join(_os.getcwd(), path)
196 else:
197 return path
198
199
200def _write_atomic(path, data, mode=0o666):

Callers 4

cache_from_sourceFunction · 0.85
spec_from_file_locationFunction · 0.85
__init__Method · 0.85
_fix_up_moduleFunction · 0.85

Calls 3

_path_isabsFunction · 0.85
_path_joinFunction · 0.85
removeprefixMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…