diff --git a/src/licensedcode/detection.py b/src/licensedcode/detection.py index 7e5bf1dcf8..37075c6e79 100644 --- a/src/licensedcode/detection.py +++ b/src/licensedcode/detection.py @@ -1166,18 +1166,15 @@ def is_false_positive(license_matches, package_license=False): # FIXME: actually run copyright detection here? copyright_words = ["copyright", "(c)"] has_copyrights = all( - True - for license_match in license_matches - if any( - True + any( + word in license_match.matched_text().lower() for word in copyright_words - if word in license_match.matched_text().lower() - ) + ) + for license_match in license_matches ) has_full_relevance = all( - True + license_match.rule.relevance == 100 for license_match in license_matches - if license_match.rule.relevance == 100 ) if has_copyrights or has_full_relevance: return False