MCPcopy Index your code
hub / github.com/python/mypy / convert_binary_cache_meta_to_json

Function convert_binary_cache_meta_to_json

mypy/exportjson.py:555–578  ·  view source on GitHub ↗
(data: bytes, data_file: str)

Source from the content-addressed store, hash-verified

553
554
555def convert_binary_cache_meta_to_json(data: bytes, data_file: str) -> Json:
556 assert (
557 data[0] == cache_version() and data[1] == CACHE_VERSION
558 ), "Cache file created by an incompatible mypy version"
559 meta = CacheMeta.read(ReadBuffer(data[2:]), data_file)
560 assert meta is not None, f"Error reading meta cache file associated with {data_file}"
561 return {
562 "id": meta.id,
563 "path": meta.path,
564 "mtime": meta.mtime,
565 "size": meta.size,
566 "hash": meta.hash,
567 "data_mtime": meta.data_mtime,
568 "dependencies": meta.dependencies,
569 "suppressed": meta.suppressed,
570 "options": meta.options,
571 "dep_prios": meta.dep_prios,
572 "dep_lines": meta.dep_lines,
573 "dep_hashes": [dep.hex() for dep in meta.dep_hashes],
574 "interface_hash": meta.interface_hash.hex(),
575 "version_id": meta.version_id,
576 "ignore_all": meta.ignore_all,
577 "plugin_data": meta.plugin_data,
578 }
579
580
581def main() -> None:

Callers 2

run_caseMethod · 0.90
mainFunction · 0.85

Calls 1

readMethod · 0.45

Tested by 1

run_caseMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…