Return a `license_expression.Licensing` objet built from a `licenses_db` mapping of {key: License} or the standard license db.
(licenses_db=None)
| 274 | |
| 275 | |
| 276 | def 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 | |
| 289 | def build_spdx_symbols(licenses_db=None): |
no test coverage detected