MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / notebook_is_normalized

Function notebook_is_normalized

tools/docs_and_notebooks_check.py:543–548  ·  view source on GitHub ↗
(path: Path, nb: Any)

Source from the content-addressed store, hash-verified

541
542
543def notebook_is_normalized(path: Path, nb: Any) -> bool:
544 original = path.read_text(encoding="utf-8")
545 # Normalize newline style so CRLF vs LF differences do not cause false mismatches
546 original_normalized = original.replace("\r\n", "\n").replace("\r", "\n")
547 normalized = nbformat.writes(nb, version=4, indent=2, ensure_ascii=False) + "\n"
548 return original_normalized == normalized
549
550
551def write_ipynb_meta(path: Path, nb: Any) -> None:

Callers 2

scan_filesFunction · 0.85
normalize_notebooksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected