MCPcopy
hub / github.com/lutzroeder/netron / insertRefinements

Method insertRefinements

source/python.js:17779–17785  ·  view source on GitHub ↗
(loc, ref)

Source from the content-addressed store, hash-verified

17777 return result.output();
17778 }
17779 insertRefinements(loc, ref) {
17780 for (const r of ref.activeRefinements()) {
17781 const v = this.environment_stack.getVar(r.identifier(), loc);
17782 const new_v = this.graph.insertUncheckedCast(v, r.type());
17783 this.environment_stack.setVar(loc, r.identifier(), new_v);
17784 }
17785 }
17786 shouldDeriveSetStateType(def, schema) {
17787 const noTypeAnnotations = schema.arguments.every((arg) => arg.is_inferred_type());
17788 const shouldInfer = def.name === '__setstate__' && noTypeAnnotations;

Callers 2

emitIfElseBlocksMethod · 0.80
emitSingleIfBranchMethod · 0.80

Calls 6

activeRefinementsMethod · 0.80
getVarMethod · 0.80
insertUncheckedCastMethod · 0.80
setVarMethod · 0.80
identifierMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected