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

Function assert_func_ir_valid

mypyc/analysis/ircheck.py:133–139  ·  view source on GitHub ↗
(fn: FuncIR)

Source from the content-addressed store, hash-verified

131
132
133def assert_func_ir_valid(fn: FuncIR) -> None:
134 errors = check_func_ir(fn)
135 if errors:
136 raise IrCheckException(
137 "Internal error: Generated invalid IR: \n"
138 + "\n".join(format_func(fn, [(e.source, e.desc) for e in errors]))
139 )
140
141
142def check_op_sources_valid(fn: FuncIR) -> list[FnError]:

Callers 1

Calls 4

format_funcFunction · 0.90
check_func_irFunction · 0.85
IrCheckExceptionClass · 0.85
joinMethod · 0.45

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…