Return True if any of the LicenseMatch in ``matches`` has an unknown license. Note that by construction and design, an unknown license must have the word "unknown" in its license key, but we only care about two specific license keys, and not all license keys.
(matches, licensing=Licensing())
| 600 | |
| 601 | |
| 602 | def matches_have_unknown(matches, licensing=Licensing()): |
| 603 | """ |
| 604 | Return True if any of the LicenseMatch in ``matches`` has an unknown license. |
| 605 | Note that by construction and design, an unknown license must have the word "unknown" in its |
| 606 | license key, but we only care about two specific license keys, and not all license keys. |
| 607 | """ |
| 608 | for match in matches: |
| 609 | exp = match.rule.license_expression_object |
| 610 | if any( |
| 611 | key in ('unknown', 'unknown-spdx') |
| 612 | for key in licensing.license_keys(exp) |
| 613 | ): |
| 614 | return True |
| 615 | |
| 616 | |
| 617 | def get_license_detections_from_matches(matches): |
no test coverage detected