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

Method read

mypy/build.py:5291–5309  ·  view source on GitHub ↗
(cls, buf: ReadBuffer)

Source from the content-addressed store, hash-verified

5289
5290 @classmethod
5291 def read(cls, buf: ReadBuffer) -> SccResponseMessage:
5292 scc_ids = read_int_list(buf)
5293 is_interface = read_bool(buf)
5294 tag = read_tag(buf)
5295 if tag == LITERAL_NONE:
5296 return SccResponseMessage(
5297 scc_ids=scc_ids,
5298 is_interface=is_interface,
5299 blocker=CompileError(read_str_list(buf), read_bool(buf), read_str_opt(buf)),
5300 )
5301 else:
5302 assert tag == DICT_STR_GEN
5303 return SccResponseMessage(
5304 scc_ids=scc_ids,
5305 is_interface=is_interface,
5306 result={
5307 read_str_bare(buf): ModuleResult.read(buf) for _ in range(read_int_bare(buf))
5308 },
5309 )
5310
5311 def write(self, buf: WriteBuffer) -> None:
5312 write_tag(buf, SCC_RESPONSE_MESSAGE)

Callers

nothing calls this directly

Calls 7

read_int_listFunction · 0.90
CompileErrorClass · 0.90
read_str_listFunction · 0.90
read_str_optFunction · 0.90
SccResponseMessageClass · 0.85
rangeClass · 0.85
readMethod · 0.45

Tested by

no test coverage detected