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

Function search_up

Modules/getpath.py:210–214  ·  view source on GitHub ↗
(prefix, *landmarks, test=isfile)

Source from the content-addressed store, hash-verified

208# ******************************************************************************
209
210def search_up(prefix, *landmarks, test=isfile):
211 while prefix:
212 if any(test(joinpath(prefix, f)) for f in landmarks):
213 return prefix
214 prefix = dirname(prefix)
215
216
217# ******************************************************************************

Callers 1

getpath.pyFile · 0.85

Calls 3

anyFunction · 0.50
testFunction · 0.50
dirnameFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…