(response: str)
| 267 | |
| 268 | |
| 269 | def extract_python_code(response: str) -> str: |
| 270 | |
| 271 | pattern = r'```python\s*\n(.*?)\n```' |
| 272 | matches = re.findall(pattern, response, re.DOTALL) |
| 273 | |
| 274 | if matches: |
| 275 | return matches[0].strip() |
| 276 | |
| 277 | pattern = r'```\s*\n(.*?)\n```' |
| 278 | matches = re.findall(pattern, response, re.DOTALL) |
| 279 | |
| 280 | if matches: |
| 281 | return matches[0].strip() |
| 282 | |
| 283 | return "" |
| 284 | |
| 285 | |
| 286 | def preprocess_code_paths(code_content: str, data_directory: Path) -> str: |
no outgoing calls
no test coverage detected