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

Method surround

src/licensedcode/match.py:621–630  ·  view source on GitHub ↗

Return True if this match query span surrounds other other match query span. This is different from containment. A matched query region can surround another matched query region and have no positions in common with the surrounded match.

(self, other)

Source from the content-addressed store, hash-verified

619 return round(query_coverage * rule_coverage * relevance * 100, 2)
620
621 def surround(self, other):
622 """
623 Return True if this match query span surrounds other other match query
624 span.
625
626 This is different from containment. A matched query region can surround
627 another matched query region and have no positions in common with the
628 surrounded match.
629 """
630 return self.qstart <= other.qstart and self.qend >= other.qend
631
632 def is_after(self, other):
633 """

Callers 3

merge_matchesFunction · 0.45

Calls

no outgoing calls

Tested by 1