ASP refactoring, sequence generation via clusterization

This commit is contained in:
Mark Voltov 2024-02-02 14:22:21 +00:00 committed by Igor Brylyov
parent d2ab856d64
commit fd59ab9e26
45 changed files with 1579 additions and 1267 deletions

View file

@ -0,0 +1,28 @@
import json
from repository.file_system_repository import FileSystemRepository
from usecases.exit_freecad_use_case import (
ExitFreeCadUseCase,
)
class ErrorStringModel:
def __init__(self, error: str) -> None:
self.error = error
pass
error: str
def toString(self) -> str:
return json.dumps(
{
"error": self.error,
},
ensure_ascii=False,
indent=4,
)
def toFileSystem(self, path: str):
return (
FileSystemRepository.writeFile(self.toString(), path, "error.json"),
ExitFreeCadUseCase.call(),
)