(def, schema)
| 17784 | } |
| 17785 | } |
| 17786 | shouldDeriveSetStateType(def, schema) { |
| 17787 | const noTypeAnnotations = schema.arguments.every((arg) => arg.is_inferred_type()); |
| 17788 | const shouldInfer = def.name === '__setstate__' && noTypeAnnotations; |
| 17789 | if (!shouldInfer) { |
| 17790 | return false; |
| 17791 | } |
| 17792 | if (def.name !== '__setstate__' && def.args.args.length !== 2) { |
| 17793 | throw new python.Error(`Invalid '__setstate' method.`); |
| 17794 | } |
| 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.'); |
no test coverage detected