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

Function source_section_ids

scripts/lint_grounding.py:61–75  ·  view source on GitHub ↗
(source_manifest: dict[str, Any])

Source from the content-addressed store, hash-verified

59
60
61def source_section_ids(source_manifest: dict[str, Any]) -> set[str]:
62 ids: set[str] = set()
63 for section in source_manifest.get("sections", []) or []:
64 if isinstance(section, dict):
65 sid = normalize_whitespace(str(section.get("section_id", "")))
66 if sid:
67 ids.add(sid)
68 for page in source_manifest.get("pages", []) or []:
69 if not isinstance(page, dict):
70 continue
71 for sid in page.get("section_ids", []) or []:
72 cleaned = normalize_whitespace(str(sid))
73 if cleaned:
74 ids.add(cleaned)
75 return ids
76
77
78def total_pages(source_manifest: dict[str, Any]) -> int:

Callers 1

validate_note_planFunction · 0.85

Calls 1

normalize_whitespaceFunction · 0.90

Tested by

no test coverage detected