MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / is_generic

Method is_generic

src/licensedcode/models.py:1883–1893  ·  view source on GitHub ↗

Return True if the license_expression of this rule contains a generic or unknown license key.

(self, licenses_by_key)

Source from the content-addressed store, hash-verified

1881 )
1882
1883 def is_generic(self, licenses_by_key):
1884 """
1885 Return True if the license_expression of this rule contains a generic or unknown
1886 license key.
1887 """
1888 license_keys = self.licensing.license_keys(self.license_expression)
1889 for lic_key in license_keys:
1890 lic = licenses_by_key.get(lic_key)
1891 if lic and (lic.is_generic or lic.is_unknown):
1892 return True
1893 return False
1894
1895 @property
1896 def license_flag_names(self):

Callers 2

validateMethod · 0.95

Calls 2

license_keysMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected