MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / _header_hash

Function _header_hash

Scripts/codegen/build_introspect_snapshot.py:51–60  ·  view source on GitHub ↗

SHA-256 of the concatenated header content. Lets callers skip re-running the snapshot when nothing upstream changed.

(paths: List[str])

Source from the content-addressed store, hash-verified

49
50
51def _header_hash(paths: List[str]) -> str:
52 """SHA-256 of the concatenated header content. Lets callers skip
53 re-running the snapshot when nothing upstream changed."""
54 h = hashlib.sha256()
55 for p in sorted(paths):
56 if not os.path.exists(p):
57 continue
58 with open(p, "rb") as f:
59 h.update(f.read())
60 return h.hexdigest()
61
62
63def _strip_doc(raw: str) -> str:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected