MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / dedupe_strings

Function dedupe_strings

experiments/baselines/nl_profile/runner.py:212–224  ·  view source on GitHub ↗
(values: Iterable[Any])

Source from the content-addressed store, hash-verified

210
211
212def dedupe_strings(values: Iterable[Any]) -> List[str]:
213 result: List[str] = []
214 seen: set[str] = set()
215 for value in values:
216 cleaned = str(value or "").strip()
217 if not cleaned:
218 continue
219 marker = cleaned.casefold()
220 if marker in seen:
221 continue
222 seen.add(marker)
223 result.append(cleaned)
224 return result
225
226
227def load_roles(roles_file: Path) -> Dict[str, Dict[str, Any]]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected