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

Method read

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

Source from the content-addressed store, hash-verified

5025
5026 @classmethod
5027 def read(cls, data: ReadBuffer) -> SymbolTableNode:
5028 assert read_tag(data) == SYMBOL_TABLE_NODE
5029 sym = SymbolTableNode(read_int(data), None)
5030 sym.module_hidden = read_bool(data)
5031 sym.module_public = read_bool(data)
5032 sym.implicit = read_bool(data)
5033 sym.plugin_generated = read_bool(data)
5034 cross_ref = read_str_opt(data)
5035 if cross_ref is None:
5036 tag = read_tag(data)
5037 if tag == TYPE_INFO:
5038 sym._node = TypeInfo.read(data)
5039 else:
5040 sym._node_bytes = extract_symbol(data)
5041 sym._node_tag = tag
5042 sym.unfixed = True
5043 else:
5044 sym.cross_ref = cross_ref
5045 sym.unfixed = True
5046 assert read_tag(data) == END_TAG
5047 return sym
5048
5049
5050class SymbolTable(dict[str, SymbolTableNode]):

Callers

nothing calls this directly

Calls 4

read_intFunction · 0.90
read_str_optFunction · 0.90
SymbolTableNodeClass · 0.85
readMethod · 0.45

Tested by

no test coverage detected