MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / _dedupe_values

Function _dedupe_values

scripts/citation_links.py:231–243  ·  view source on GitHub ↗
(values: list[str])

Source from the content-addressed store, hash-verified

229
230
231def _dedupe_values(values: list[str]) -> list[str]:
232 seen: set[str] = set()
233 deduped: list[str] = []
234 for value in values:
235 cleaned = normalize_whitespace(value)
236 if not cleaned:
237 continue
238 folded = cleaned.casefold()
239 if folded in seen:
240 continue
241 seen.add(folded)
242 deduped.append(cleaned)
243 return deduped
244
245
246def _note_text_keys(note: dict[str, Any]) -> list[str]:

Callers 1

_note_text_keysFunction · 0.85

Calls 1

normalize_whitespaceFunction · 0.90

Tested by

no test coverage detected