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

Method read

mypy/nodes.py:418–439  ·  view source on GitHub ↗
(cls, data: ReadBuffer)

Source from the content-addressed store, hash-verified

416
417 @classmethod
418 def read(cls, data: ReadBuffer) -> FileRawData:
419 defs = read_bytes(data)
420 imports = read_bytes(data)
421 assert read_tag(data) == LIST_GEN
422 raw_errors = [read_parse_error(data) for _ in range(read_int_bare(data))]
423 assert read_tag(data) == DICT_INT_GEN
424 ignored_lines = {read_int(data): read_str_list(data) for _ in range(read_int_bare(data))}
425 is_partial_stub_package = read_bool(data)
426 uses_template_strings = read_bool(data)
427 source_hash = read_str(data)
428 assert read_tag(data) == LIST_GEN
429 mypy_comments = [(read_int(data), read_str(data)) for _ in range(read_int_bare(data))]
430 return FileRawData(
431 defs,
432 imports,
433 raw_errors,
434 ignored_lines,
435 is_partial_stub_package,
436 uses_template_strings,
437 source_hash,
438 mypy_comments,
439 )
440
441
442class MypyFile(SymbolNode):

Callers

nothing calls this directly

Calls 7

read_bytesFunction · 0.90
read_intFunction · 0.90
read_str_listFunction · 0.90
read_strFunction · 0.90
read_parse_errorFunction · 0.85
rangeClass · 0.85
FileRawDataClass · 0.85

Tested by

no test coverage detected