Skip to content

Commit b34198e

Browse files
Modify Misc LicenseDetection attributes
- Rename count to detections_count in UniqueLicenseDetection - Add rule_relevance back to match level data Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent d61ae7d commit b34198e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/licensedcode/detection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ class UniqueDetection:
583583
"""
584584
identifier = attr.ib(default=None)
585585
license_expression = attr.ib(default=None)
586-
count = attr.ib(default=None)
586+
detection_count = attr.ib(default=None)
587587
matches = attr.ib(default=attr.Factory(list))
588588
detection_log = attr.ib(default=attr.Factory(list))
589589
files = attr.ib(factory=list)
@@ -611,7 +611,7 @@ def get_unique_detections(cls, license_detections):
611611
license_expression=detection_mapping["license_expression"],
612612
detection_log=detection_mapping["detection_log"],
613613
matches=detection_mapping["matches"],
614-
count=len(file_regions),
614+
detection_count=len(file_regions),
615615
files=file_regions,
616616
)
617617
)

src/licensedcode/match.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ def to_dict(
790790
# LicenseDB Level Information (Rule that was matched)
791791
result['license_expression'] = self.rule.license_expression
792792
result['rule_identifier'] = self.rule.identifier
793+
result['rule_relevance'] = self.rule.relevance
793794
result['rule_url'] = self.rule.rule_url
794795

795796
if include_text:

0 commit comments

Comments
 (0)