MCPcopy Index your code
hub / github.com/plotly/dash / app_get_relative_path

Function app_get_relative_path

dash/_get_paths.py:76–88  ·  view source on GitHub ↗
(requests_pathname, path)

Source from the content-addressed store, hash-verified

74
75
76def app_get_relative_path(requests_pathname, path):
77 if requests_pathname == "/" and path == "":
78 return "/"
79 if requests_pathname != "/" and path == "":
80 return requests_pathname
81 if not path.startswith("/"):
82 raise exceptions.UnsupportedRelativePath(
83 f"""
84 Paths that aren't prefixed with a leading / are not supported.
85 You supplied: {path}
86 """
87 )
88 return "/".join([requests_pathname.rstrip("/"), path.lstrip("/")])
89
90
91def strip_relative_path(path):

Callers 3

get_relative_pathFunction · 0.85

Calls

no outgoing calls

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…