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

Function licenses_mapper

src/packagedcode/rubygems.py:520–533  ·  view source on GitHub ↗

Return a `declared_licenses` list based on the `lic` license and `lics` licenses values found in a package_data.

(lic, lics)

Source from the content-addressed store, hash-verified

518
519
520def licenses_mapper(lic, lics):
521 """
522 Return a `declared_licenses` list based on the `lic` license and
523 `lics` licenses values found in a package_data.
524 """
525 declared_licenses = []
526 if lic:
527 declared_licenses.append(str(license).strip())
528 if lics:
529 for lic in lics:
530 lic = lic.strip()
531 if lic:
532 declared_licenses.append(lic)
533 return declared_licenses
534
535
536def get_dependencies(dependencies):

Callers 1

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected