MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / load_text_lines

Function load_text_lines

scripts/compare_backend_snapshots.py:34–38  ·  view source on GitHub ↗
(path: Path, lowercase: bool)

Source from the content-addressed store, hash-verified

32
33
34def load_text_lines(path: Path, lowercase: bool) -> Tuple[List[str], Counter]:
35 raw = path.read_text(encoding="utf-8", errors="ignore").splitlines()
36 normalized = [normalize_line(line, lowercase) for line in raw]
37 normalized = [line for line in normalized if line]
38 return normalized, Counter(normalized)
39
40
41def normalize_json(value: Any) -> Any:

Callers 1

compare_textFunction · 0.85

Calls 2

normalize_lineFunction · 0.85
CounterStruct · 0.50

Tested by

no test coverage detected