MCPcopy
hub / github.com/Gracker/awesome-android-ai-dev-sources / same_source

Function same_source

process_candidates.py:220–229  ·  view source on GitHub ↗
(left: dict[str, Any], right: dict[str, Any])

Source from the content-addressed store, hash-verified

218
219
220def same_source(left: dict[str, Any], right: dict[str, Any]) -> bool:
221 left_id = norm_text(left.get("id"))
222 right_id = norm_text(right.get("id"))
223 if left_id and right_id and left_id == right_id:
224 return True
225 left_primary = primary_url(left)
226 right_primary = primary_url(right)
227 if left_primary and right_primary and left_primary == right_primary:
228 return True
229 return False
230
231
232def duplicate_reason(candidate: dict[str, Any], entry: dict[str, Any]) -> str | None:

Callers 1

dedupe_entriesFunction · 0.85

Calls 2

norm_textFunction · 0.85
primary_urlFunction · 0.85

Tested by

no test coverage detected