@@ -106,11 +106,10 @@ class DetectionCategory(Enum):
106
106
EXTRA_WORDS = 'extra-words'
107
107
UNKNOWN_MATCH = 'unknown-match'
108
108
LICENSE_CLUES = 'license-clues'
109
- LOW_QUALITY_MATCHES = 'license-clues '
109
+ LOW_QUALITY_MATCH_FRAGMENTS = 'low-quality-matches '
110
110
IMPERFECT_COVERAGE = 'imperfect-match-coverage'
111
111
FALSE_POSITVE = 'possible-false-positive'
112
112
UNDETECTED_LICENSE = 'undetected-license'
113
- MATCH_FRAGMENTS = 'match-fragments'
114
113
LOW_RELEVANCE = 'low-relevance'
115
114
116
115
@@ -124,6 +123,7 @@ class DetectionRule(Enum):
124
123
"""
125
124
UNKNOWN_MATCH = 'unknown-match'
126
125
LICENSE_CLUES = 'license-clues'
126
+ LOW_QUALITY_MATCH_FRAGMENTS = 'low-quality-matches'
127
127
FALSE_POSITIVE = 'possible-false-positive'
128
128
NOT_LICENSE_CLUES = 'not-license-clues-as-more-detections-present'
129
129
UNKNOWN_REFERENCE_TO_LOCAL_FILE = 'unknown-reference-to-local-file'
@@ -1374,12 +1374,12 @@ def get_detected_license_expression(
1374
1374
detection_log .append (DetectionRule .LICENSE_CLUES .value )
1375
1375
return detection_log , combined_expression
1376
1376
1377
- elif analysis == DetectionCategory .LOW_QUALITY_MATCHES .value :
1377
+ elif analysis == DetectionCategory .LOW_QUALITY_MATCH_FRAGMENTS .value :
1378
1378
if TRACE_ANALYSIS :
1379
1379
logger_debug (f'analysis { DetectionCategory .LICENSE_CLUES .value } ' )
1380
1380
# TODO: we are temporarily returning these as license clues, and not
1381
1381
# in detections but ideally we should return synthetic unknowns for these
1382
- detection_log .append (DetectionRule .LOW_QUALITY_MATCHES .value )
1382
+ detection_log .append (DetectionRule .LOW_QUALITY_MATCH_FRAGMENTS .value )
1383
1383
return detection_log , combined_expression
1384
1384
1385
1385
else :
@@ -1501,7 +1501,7 @@ def get_ambiguous_license_detections_by_type(unique_license_detections):
1501
1501
1502
1502
for detection in unique_license_detections :
1503
1503
if not detection .license_expression :
1504
- ambi_license_detections [DetectionCategory .MATCH_FRAGMENTS .value ] = detection
1504
+ ambi_license_detections [DetectionCategory .LOW_QUALITY_MATCH_FRAGMENTS .value ] = detection
1505
1505
1506
1506
elif is_undetected_license_matches (license_matches = detection .matches ):
1507
1507
ambi_license_detections [DetectionCategory .UNDETECTED_LICENSE .value ] = detection
@@ -1567,7 +1567,7 @@ def analyze_detection(license_matches, package_license=False):
1567
1567
return DetectionCategory .UNKNOWN_MATCH .value
1568
1568
1569
1569
elif not package_license and is_low_quality_matches (license_matches = license_matches ):
1570
- return DetectionCategory .LOW_QUALITY_MATCHES .value
1570
+ return DetectionCategory .LOW_QUALITY_MATCH_FRAGMENTS .value
1571
1571
1572
1572
# Case where at least one of the matches have `match_coverage`
1573
1573
# below IMPERFECT_MATCH_COVERAGE_THR
0 commit comments