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

Function _resolve_filename

Tools/c-analyzer/c_parser/source.py:41–54  ·  view source on GitHub ↗
(filename, alt=None)

Source from the content-addressed store, hash-verified

39
40
41def _resolve_filename(filename, alt=None):
42 if os.path.isabs(filename):
43 ...
44# raise NotImplementedError
45 else:
46 filename = os.path.join('.', filename)
47
48 if not alt:
49 alt = filename
50 elif os.path.abspath(filename) == os.path.abspath(alt):
51 alt = filename
52 else:
53 raise ValueError(f'mismatch: {filename} != {alt}')
54 return filename, alt
55
56
57@contextlib.contextmanager

Callers 2

resolveFunction · 0.85
good_fileFunction · 0.85

Calls 3

isabsMethod · 0.45
joinMethod · 0.45
abspathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…