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

Method read

mypy/cache.py:214–241  ·  view source on GitHub ↗
(cls, data: ReadBuffer, data_file: str)

Source from the content-addressed store, hash-verified

212
213 @classmethod
214 def read(cls, data: ReadBuffer, data_file: str) -> CacheMeta | None:
215 try:
216 return CacheMeta(
217 id=read_str(data),
218 path=read_str(data),
219 mtime=read_int(data),
220 size=read_int(data),
221 hash=read_str(data),
222 dependencies=read_str_list(data),
223 data_mtime=read_int(data),
224 data_file=data_file,
225 suppressed=read_str_list(data),
226 imports_ignored={
227 read_int(data): read_str_list(data) for _ in range(read_int_bare(data))
228 },
229 options=read_json(data),
230 suppressed_deps_opts=read_bytes(data),
231 dep_prios=read_int_list(data),
232 dep_lines=read_int_list(data),
233 dep_hashes=read_bytes_list(data),
234 interface_hash=read_bytes(data),
235 trans_dep_hash=read_bytes(data),
236 version_id=read_str(data),
237 ignore_all=read_bool(data),
238 plugin_data=read_json_value(data),
239 )
240 except (ValueError, AssertionError):
241 return None
242
243
244class CacheMetaEx:

Callers

nothing calls this directly

Calls 10

CacheMetaClass · 0.85
read_strFunction · 0.85
read_intFunction · 0.85
read_str_listFunction · 0.85
rangeClass · 0.85
read_jsonFunction · 0.85
read_bytesFunction · 0.85
read_int_listFunction · 0.85
read_bytes_listFunction · 0.85
read_json_valueFunction · 0.85

Tested by

no test coverage detected