MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / _get_relative_filename_abs_path

Function _get_relative_filename_abs_path

pydevd_file_utils.py:473–484  ·  view source on GitHub ↗
(filename, func, os_path_exists=os_path_exists)

Source from the content-addressed store, hash-verified

471
472
473def _get_relative_filename_abs_path(filename, func, os_path_exists=os_path_exists):
474 # If we have a relative path and the file does not exist when made absolute, try to
475 # resolve it based on the sys.path entries.
476 for p in sys.path:
477 r = func(os.path.join(p, filename))
478 if os_path_exists(r):
479 return r
480
481 # We couldn't find the real file for the relative path. Resolve it as if it was in
482 # a library (so that it's considered a library file and not a project file).
483 r = func(os.path.join(_library_dir, filename))
484 return r
485
486
487def _apply_func_and_normalize_case(filename, func, isabs, normalize_case, os_path_exists=os_path_exists, join=join):

Callers 2

existsFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected