The list is short enough so linear scan is proper.
(iolist: List[int], target_evalue_idx: int)
| 190 | |
| 191 | def _format_arg(evalue_idx: int) -> str: |
| 192 | def _get_io_index(iolist: List[int], target_evalue_idx: int) -> int: |
| 193 | """ |
| 194 | The list is short enough so linear scan is proper. |
| 195 | """ |
| 196 | for io_idx, evalue_idx in enumerate(iolist): |
| 197 | if evalue_idx == target_evalue_idx: |
| 198 | return io_idx |
| 199 | return -1 |
| 200 | |
| 201 | argstr = str(evalue_idx) |
| 202 | if (input_idx := _get_io_index(inputs, evalue_idx)) >= 0: |