Skip to content

Commit 7322dc2

Browse files
committed
Add license-clarity attribute in Package model
Signed-off-by: swastik <swastkk@gmail.com>
1 parent 4f49985 commit 7322dc2

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/packagedcode/models.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,13 @@ class Package(PackageData):
15301530
label='datasource ids',
15311531
help='List of the datasource ids used to create this package.'
15321532
)
1533-
1533+
1534+
license_clarity = List(
1535+
item_type=dict,
1536+
label='License Clarity Information',
1537+
help='List containing the license clarity score and related elements.'
1538+
)
1539+
15341540
def __attrs_post_init__(self, *args, **kwargs):
15351541
if not self.package_uid:
15361542
self.package_uid = build_package_uid(self.purl)
@@ -1543,6 +1549,7 @@ def to_package_data(self):
15431549
mapping.pop('package_uid', None)
15441550
mapping.pop('datafile_paths', None)
15451551
mapping.pop('datasource_ids', None)
1552+
mapping.pop('license_clarity', None)
15461553
return PackageData.from_dict(mapping)
15471554

15481555
@classmethod

0 commit comments

Comments
 (0)