MCPcopy Index your code
hub / github.com/python/mypy / os_path_join

Function os_path_join

mypy/util.py:446–453  ·  view source on GitHub ↗
(path: str, b: str)

Source from the content-addressed store, hash-verified

444if sys.platform == "linux" or sys.platform == "darwin":
445
446 def os_path_join(path: str, b: str) -> str:
447 # Based off of os.path.join, but simplified to str-only, 2 args and mypyc can compile it.
448 if b.startswith("/") or not path:
449 return b
450 elif path.endswith("/"):
451 return path + b
452 else:
453 return path + "/" + b
454
455else:
456

Callers 15

find_lib_path_dirsMethod · 0.90
_find_moduleMethod · 0.90
verify_moduleFunction · 0.90
highest_init_levelFunction · 0.90
load_stdlib_py_versionsFunction · 0.90
buildFunction · 0.90
load_plugins_from_configFunction · 0.90
_cache_dir_prefixFunction · 0.90
add_catch_all_gitignoreFunction · 0.90

Calls 3

startswithMethod · 0.45
endswithMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…