(response: str)
| 307 | |
| 308 | |
| 309 | def extract_python_code(response: str) -> str: |
| 310 | |
| 311 | pattern = r'```python\s*\n(.*?)\n```' |
| 312 | matches = re.findall(pattern, response, re.DOTALL) |
| 313 | |
| 314 | if matches: |
| 315 | return matches[0].strip() |
| 316 | |
| 317 | pattern = r'```\s*\n(.*?)\n```' |
| 318 | matches = re.findall(pattern, response, re.DOTALL) |
| 319 | |
| 320 | if matches: |
| 321 | return matches[0].strip() |
| 322 | |
| 323 | return "" |
| 324 | |
| 325 | |
| 326 | def preprocess_code_paths(code_content: str, data_directory: Path) -> str: |
no outgoing calls
no test coverage detected