File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1139,7 +1139,9 @@ def has_correct_license_clue_matches(license_matches):
1139
1139
Return True if all the matches in ``license_matches`` List of LicenseMatch
1140
1140
has True for the `is_license_clue` rule attribute.
1141
1141
"""
1142
- return is_correct_detection (license_matches ) and all (match .rule .is_license_clue for match in license_matches )
1142
+ return is_correct_detection (license_matches ) and all (
1143
+ match .rule .is_license_clue for match in license_matches
1144
+ )
1143
1145
1144
1146
1145
1147
def is_low_quality_matches (license_matches ):
@@ -1554,13 +1556,13 @@ def analyze_detection(license_matches, package_license=False):
1554
1556
):
1555
1557
return DetectionCategory .FALSE_POSITVE .value
1556
1558
1559
+ elif has_correct_license_clue_matches (license_matches = license_matches ):
1560
+ return DetectionCategory .LICENSE_CLUES .value
1561
+
1557
1562
# Case where all matches have `matcher` as `1-hash` or `4-spdx-id`
1558
1563
elif is_correct_detection_non_unknown (license_matches = license_matches ):
1559
1564
return DetectionCategory .PERFECT_DETECTION .value
1560
1565
1561
- elif has_correct_license_clue_matches (license_matches = license_matches ):
1562
- return DetectionCategory .LICENSE_CLUES .value
1563
-
1564
1566
# Case where even though the matches have perfect coverage, they have
1565
1567
# matches with `unknown` rule identifiers
1566
1568
elif has_unknown_matches (license_matches = license_matches ):
You can’t perform that action at this time.
0 commit comments