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

Method _icoverage

src/licensedcode/match.py:472–479  ·  view source on GitHub ↗

Return the coverage of this match to the matched rule as a float between 0 and 1.

(self)

Source from the content-addressed store, hash-verified

470 return self.qspan.overlap(other.qspan)
471
472 def _icoverage(self):
473 """
474 Return the coverage of this match to the matched rule as a float between
475 0 and 1.
476 """
477 if not self.rule.length:
478 return 0
479 return self.len() / self.rule.length
480
481 def coverage(self):
482 """

Callers 2

coverageMethod · 0.95
scoreMethod · 0.95

Calls 1

lenMethod · 0.95

Tested by

no test coverage detected