Return a new License object for a license ``key`` and load its attribute from a data file stored in ``licenses_data_dir``.
(cls, key, licenses_data_dir=licenses_data_dir, check_consistency=True, is_builtin=True)
| 368 | |
| 369 | @classmethod |
| 370 | def from_dir(cls, key, licenses_data_dir=licenses_data_dir, check_consistency=True, is_builtin=True): |
| 371 | """ |
| 372 | Return a new License object for a license ``key`` and load its attribute |
| 373 | from a data file stored in ``licenses_data_dir``. |
| 374 | """ |
| 375 | lic = cls(key=key, is_builtin=is_builtin) |
| 376 | license_file = lic.license_file(licenses_data_dir=licenses_data_dir) |
| 377 | lic.load(license_file=license_file, check_consistency=check_consistency) |
| 378 | return lic |
| 379 | |
| 380 | @property |
| 381 | def scancode_url(self): |
no test coverage detected