MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / get_root

Function get_root

tools/check_changes.py:24–30  ·  view source on GitHub ↗
(script_path)

Source from the content-addressed store, hash-verified

22
23
24def get_root(script_path):
25 folder = script_path.resolve().parent
26 while not (folder / ".git").exists():
27 folder = folder.parent
28 if folder == folder.anchor:
29 raise RuntimeError("git repo not found")
30 return folder
31
32
33def main(argv):

Callers 1

mainFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected