(val: Instruction)
| 149 | |
| 150 | |
| 151 | def _convert_instruction(val: Instruction) -> Any: |
| 152 | result = _flatbuffer_t_class(Instruction)() |
| 153 | union_val = val.instr_args |
| 154 | if union_val is None: |
| 155 | result.instrArgsType = _InstructionArguments.InstructionArguments.NONE |
| 156 | result.instrArgs = None |
| 157 | return result |
| 158 | union_name = type(union_val).__name__ |
| 159 | result.instrArgsType = getattr( |
| 160 | _InstructionArguments.InstructionArguments, union_name |
| 161 | ) |
| 162 | result.instrArgs = _convert_value(union_val) |
| 163 | return result |
| 164 | |
| 165 | |
| 166 | def _convert_dataclass(val: Any) -> Any: |
no test coverage detected