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

Method itokens_hash

src/licensedcode/match.py:746–753  ·  view source on GitHub ↗

Return a hash from the matched itoken ids.

(self, idx)

Source from the content-addressed store, hash-verified

744 yield token
745
746 def itokens_hash(self, idx):
747 """
748 Return a hash from the matched itoken ids.
749 """
750 from licensedcode.match_hash import index_hash
751 itokens = list(self.itokens(idx))
752 if itokens:
753 return index_hash(itokens)
754
755 # FIXME: this should be done for all the matches found in a given scanned
756 # location at once to avoid reprocessing many times the original text

Callers

nothing calls this directly

Calls 2

itokensMethod · 0.95
index_hashFunction · 0.90

Tested by

no test coverage detected