MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / build_licensing

Function build_licensing

src/licensedcode/cache.py:276–286  ·  view source on GitHub ↗

Return a `license_expression.Licensing` objet built from a `licenses_db` mapping of {key: License} or the standard license db.

(licenses_db=None)

Source from the content-addressed store, hash-verified

274
275
276def build_licensing(licenses_db=None):
277 """
278 Return a `license_expression.Licensing` objet built from a `licenses_db`
279 mapping of {key: License} or the standard license db.
280 """
281 from license_expression import LicenseSymbolLike
282 from license_expression import Licensing
283 from licensedcode.models import load_licenses
284
285 licenses_db = licenses_db or load_licenses()
286 return Licensing(symbols=(LicenseSymbolLike(lic) for lic in licenses_db.values()))
287
288
289def build_spdx_symbols(licenses_db=None):

Callers 1

load_or_buildMethod · 0.85

Calls 2

load_licensesFunction · 0.90
valuesMethod · 0.45

Tested by

no test coverage detected