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

Class ScoringElements

src/summarycode/score.py:214–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212
213@attr.s()
214class ScoringElements:
215 score = attr.ib(default=0)
216 declared_license = attr.ib(default=False)
217 identification_precision = attr.ib(default=False)
218 has_license_text = attr.ib(default=False)
219 declared_copyrights = attr.ib(default=False)
220 conflicting_license_categories = attr.ib(default=False)
221 ambiguous_compound_licensing = attr.ib(default=False)
222
223 def to_dict(self):
224 return {
225 'score': self.score,
226 'declared_license': self.declared_license,
227 'identification_precision': self.identification_precision,
228 'has_license_text': self.has_license_text,
229 'declared_copyrights': self.declared_copyrights,
230 'conflicting_license_categories': self.conflicting_license_categories,
231 'ambiguous_compound_licensing': self.ambiguous_compound_licensing,
232 }
233
234
235# minimum score to consider a license detection as good.

Callers 1

compute_license_scoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected