(self, response: List[Dict[str, str]], project_name: str)
| 66 | return result |
| 67 | |
| 68 | def save_code_to_project(self, response: List[Dict[str, str]], project_name: str): |
| 69 | file_path_dir = None |
| 70 | project_name = project_name.lower().replace(" ", "-") |
| 71 | |
| 72 | for file in response: |
| 73 | file_path = os.path.join(self.project_dir, project_name, file['file']) |
| 74 | file_path_dir = os.path.dirname(file_path) |
| 75 | os.makedirs(file_path_dir, exist_ok=True) |
| 76 | |
| 77 | with open(file_path, "w", encoding="utf-8") as f: |
| 78 | f.write(file["code"]) |
| 79 | |
| 80 | return file_path_dir |
| 81 | |
| 82 | def get_project_path(self, project_name: str): |
| 83 | project_name = project_name.lower().replace(" ", "-") |
no outgoing calls
no test coverage detected