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

Function declared_license

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

Source from the content-addressed store, hash-verified

54
55
56def declared_license(pkg_dir):
57 try:
58 with open(os.path.join(pkg_dir, "package.json"), encoding="utf-8") as fh:
59 d = json.load(fh)
60 except (OSError, ValueError):
61 return "UNKNOWN"
62 lic = d.get("license", "UNKNOWN")
63 if isinstance(lic, dict):
64 lic = lic.get("type", "UNKNOWN")
65 return str(lic)
66
67
68def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected