(text, init_sql)
| 97 | |
| 98 | |
| 99 | def extract_sql(text, init_sql): |
| 100 | pattern = r'The modified SQL: (.*)' |
| 101 | |
| 102 | result = re.search(pattern, text) |
| 103 | if "not an extremum problem" in text: |
| 104 | return init_sql |
| 105 | |
| 106 | if result: |
| 107 | modified_sql = result.group(1) |
| 108 | return modified_sql |
| 109 | else: |
| 110 | print("No match found.") |
| 111 | return init_sql |
| 112 | |
| 113 | |
| 114 | def get_dict_from_str(content): |
no outgoing calls
no test coverage detected