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

Method checkApplyNumInputs

source/python.js:17797–17804  ·  view source on GitHub ↗
(apply, expected_inputs)

Source from the content-addressed store, hash-verified

17795 return true;
17796 }
17797 checkApplyNumInputs(apply, expected_inputs) {
17798 if (apply.args.length !== expected_inputs) {
17799 throw new python.Error('Invalid number of arguments.');
17800 }
17801 if (apply.keywords.length > 0) {
17802 throw new python.Error('Invalid number of keyword arguments.');
17803 }
17804 }
17805 checkApplyNumInputsRange(apply, min_expected_inputs, max_expected_inputs) {
17806 const position_arg_size = apply.args.length;
17807 if (position_arg_size < min_expected_inputs || position_arg_size > max_expected_inputs) {

Callers 2

emitCondExprMethod · 0.80
emitApplySpecialFormMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected