Image Pipeline Playground
fix(backend/models): use StrEnum for port and event types
Mohammad Rajaei253068c8120d
diff --git a/backend/app/models/graph.py b/backend/app/models/graph.pyindex cfe902e..d143faa 100644--- a/backend/app/models/graph.py+++ b/backend/app/models/graph.py@@ -2,13 +2,13 @@from __future__ import annotations-from enum import Enum+from enum import StrEnumfrom typing import Anyfrom pydantic import BaseModel, Field-class PortDirection(str, Enum):+class PortDirection(StrEnum):INPUT = "input"OUTPUT = "output"@@ -48,7 +48,7 @@ class ExecuteRequest(BaseModel):cache: bool = True-class ExecutionEventType(str, Enum):+class ExecutionEventType(StrEnum):PROGRESS = "progress"PREVIEW = "preview"LOG = "log"