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

Method __attrs_post_init__

src/licensedcode/models.py:2760–2771  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

2758 """
2759
2760 def __attrs_post_init__(self, *args, **kwargs):
2761 self.identifier = f'spdx-license-identifier-{self.pysafe_expression}-{self._unique_id}'
2762 self.setup()
2763
2764 if not self.license_expression:
2765 raise InvalidRule(f'Empty license expression: {self.identifier}')
2766
2767 self.is_license_tag = True
2768 self.is_small = False
2769 self.relevance = 100
2770 self.has_stored_relevance = True
2771 self.is_synthetic = True
2772
2773
2774UNKNOWN_LICENSE_KEY = 'unknown'

Callers

nothing calls this directly

Calls 2

InvalidRuleClass · 0.85
setupMethod · 0.45

Tested by

no test coverage detected