MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / license_text

Function license_text

scripts/gen-ui-licenses.py:43–53  ·  view source on GitHub ↗
(pkg_dir)

Source from the content-addressed store, hash-verified

41
42
43def license_text(pkg_dir):
44 if not os.path.isdir(pkg_dir):
45 return None
46 for fname in sorted(os.listdir(pkg_dir)):
47 if fname.upper().startswith(("LICENSE", "LICENCE", "COPYING", "NOTICE")):
48 try:
49 with open(os.path.join(pkg_dir, fname), encoding="utf-8", errors="replace") as fh:
50 return fh.read().strip()
51 except OSError:
52 continue
53 return None
54
55
56def declared_license(pkg_dir):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected