(query_value_replaced: List[str], values_in_order: List[str])
| 107 | |
| 108 | # plug in the values into query with value slots |
| 109 | def plugin(query_value_replaced: List[str], values_in_order: List[str]) -> str: |
| 110 | q_length = len(query_value_replaced) |
| 111 | query_w_values = query_value_replaced[:] |
| 112 | value_idx = [idx for idx in range(q_length) if query_value_replaced[idx] == VALUE_NUM_SYMBOL.lower()] |
| 113 | assert len(value_idx) == len(values_in_order) |
| 114 | |
| 115 | for idx, value in zip(value_idx, values_in_order): |
| 116 | query_w_values[idx] = value |
| 117 | return ' '.join(query_w_values) |
| 118 | |
| 119 | |
| 120 | # a generator generating all possible ways of |
no outgoing calls
no test coverage detected