@@ -106,11 +106,10 @@ class DetectionCategory(Enum):
106106 EXTRA_WORDS = 'extra-words'
107107 UNKNOWN_MATCH = 'unknown-match'
108108 LICENSE_CLUES = 'license-clues'
109- LOW_QUALITY_MATCHES = 'license-clues '
109+ LOW_QUALITY_MATCH_FRAGMENTS = 'low-quality-matches '
110110 IMPERFECT_COVERAGE = 'imperfect-match-coverage'
111111 FALSE_POSITVE = 'possible-false-positive'
112112 UNDETECTED_LICENSE = 'undetected-license'
113- MATCH_FRAGMENTS = 'match-fragments'
114113 LOW_RELEVANCE = 'low-relevance'
115114
116115
@@ -124,6 +123,7 @@ class DetectionRule(Enum):
124123 """
125124 UNKNOWN_MATCH = 'unknown-match'
126125 LICENSE_CLUES = 'license-clues'
126+ LOW_QUALITY_MATCH_FRAGMENTS = 'low-quality-matches'
127127 FALSE_POSITIVE = 'possible-false-positive'
128128 NOT_LICENSE_CLUES = 'not-license-clues-as-more-detections-present'
129129 UNKNOWN_REFERENCE_TO_LOCAL_FILE = 'unknown-reference-to-local-file'
@@ -1374,12 +1374,12 @@ def get_detected_license_expression(
13741374 detection_log .append (DetectionRule .LICENSE_CLUES .value )
13751375 return detection_log , combined_expression
13761376
1377- elif analysis == DetectionCategory .LOW_QUALITY_MATCHES .value :
1377+ elif analysis == DetectionCategory .LOW_QUALITY_MATCH_FRAGMENTS .value :
13781378 if TRACE_ANALYSIS :
13791379 logger_debug (f'analysis { DetectionCategory .LICENSE_CLUES .value } ' )
13801380 # TODO: we are temporarily returning these as license clues, and not
13811381 # 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 )
13831383 return detection_log , combined_expression
13841384
13851385 else :
@@ -1501,7 +1501,7 @@ def get_ambiguous_license_detections_by_type(unique_license_detections):
15011501
15021502 for detection in unique_license_detections :
15031503 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
15051505
15061506 elif is_undetected_license_matches (license_matches = detection .matches ):
15071507 ambi_license_detections [DetectionCategory .UNDETECTED_LICENSE .value ] = detection
@@ -1567,7 +1567,7 @@ def analyze_detection(license_matches, package_license=False):
15671567 return DetectionCategory .UNKNOWN_MATCH .value
15681568
15691569 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
15711571
15721572 # Case where at least one of the matches have `match_coverage`
15731573 # below IMPERFECT_MATCH_COVERAGE_THR
0 commit comments