MCPcopy
hub / github.com/python/mypy / read_statements

Function read_statements

mypy/nativeparse.py:238–247  ·  view source on GitHub ↗
(state: State, data: ReadBuffer, n: int)

Source from the content-addressed store, hash-verified

236
237
238def read_statements(state: State, data: ReadBuffer, n: int) -> list[Statement]:
239 defs: list[Statement] = []
240 old_num_funcs = state.num_funcs
241 for _ in range(n):
242 stmt = read_statement(state, data)
243 defs.append(stmt)
244 if state.num_funcs > old_num_funcs + 1:
245 # There were at least two functions, so we may need to merge overloads.
246 defs = fix_function_overloads(state, defs)
247 return defs
248
249
250def parse_to_binary_ast(

Callers 3

load_from_rawFunction · 0.90
load_treeFunction · 0.90
read_blockFunction · 0.85

Calls 4

rangeClass · 0.85
read_statementFunction · 0.85
fix_function_overloadsFunction · 0.85
appendMethod · 0.80

Tested by 1

load_treeFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…