MCPcopy
hub / github.com/pallets/werkzeug / _walk

Function _walk

src/werkzeug/_reloader.py:156–163  ·  view source on GitHub ↗
(node: t.Mapping[str, dict[str, t.Any]], path: tuple[str, ...])

Source from the content-addressed store, hash-verified

154 rv = set()
155
156 def _walk(node: t.Mapping[str, dict[str, t.Any]], path: tuple[str, ...]) -> None:
157 for prefix, child in node.items():
158 _walk(child, path + (prefix,))
159
160 # If there are no more nodes, and a path has been accumulated, add it.
161 # Path may be empty if the "" entry is in sys.path.
162 if not node and path:
163 rv.add(os.path.join(*path))
164
165 _walk(root, ())
166 return rv

Callers 1

_find_common_rootsFunction · 0.85

Calls 2

itemsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected