MCPcopy Create free account
hub / github.com/microsoft/BitNet / must_read

Function must_read

utils/convert.py:979–983  ·  view source on GitHub ↗
(fp: IO[bytes], length: int)

Source from the content-addressed store, hash-verified

977
978
979def must_read(fp: IO[bytes], length: int) -> bytes:
980 ret = fp.read(length)
981 if len(ret) < length:
982 raise EOFError("unexpectedly reached end of file")
983 return ret
984
985
986@functools.lru_cache(maxsize=None)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected