File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -583,17 +583,13 @@ def get_license_expression_from_detection_mappings(
583
583
)
584
584
585
585
586
- def matches_have_unknown (matches , licensing = Licensing () ):
586
+ def matches_have_unknown (matches ):
587
587
"""
588
- Return True if any of the LicenseMatch in `matches` has an unknown license.
588
+ Return True if any of the LicenseMatch in ``matches`` has an unknown license.
589
+ Note that by construction and design, an unknown license must have the word "unknown" in its
590
+ license key, so we can shortcut the test with a string check.
589
591
"""
590
- for match in matches :
591
- exp = match .rule .license_expression_object
592
- if any (
593
- key in ('unknown' , 'unknown-spdx' )
594
- for key in licensing .license_keys (exp )
595
- ):
596
- return True
592
+ return any ('unknown' in match .rule .license_expression for match in matches )
597
593
598
594
599
595
def get_license_detections_from_matches (matches ):
You can’t perform that action at this time.
0 commit comments