From 94c6ac7fa7cf50eaf2934a66721cbc1518907855 Mon Sep 17 00:00:00 2001 From: Pouzor Date: Thu, 9 Apr 2026 14:23:13 +0200 Subject: [PATCH] fix: add type parameters to bare list annotations for mypy compliance --- backend/app/db/models.py | 2 +- backend/app/schemas/canvas.py | 2 +- backend/app/schemas/edges.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/app/db/models.py b/backend/app/db/models.py index fe73763..5c004fb 100644 --- a/backend/app/db/models.py +++ b/backend/app/db/models.py @@ -69,7 +69,7 @@ class Edge(Base): animated: Mapped[str] = mapped_column(String, nullable=False, default='none') source_handle: Mapped[str | None] = mapped_column(String) target_handle: Mapped[str | None] = mapped_column(String) - waypoints: Mapped[list | None] = mapped_column(JSON, nullable=True) + waypoints: Mapped[list[dict[str, float]] | None] = mapped_column(JSON, nullable=True) created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=_now) diff --git a/backend/app/schemas/canvas.py b/backend/app/schemas/canvas.py index 18e4e31..1eccd96 100644 --- a/backend/app/schemas/canvas.py +++ b/backend/app/schemas/canvas.py @@ -50,7 +50,7 @@ class EdgeSave(BaseModel): animated: str = 'none' source_handle: str | None = None target_handle: str | None = None - waypoints: list | None = None + waypoints: list[dict[str, float]] | None = None @field_validator('animated', mode='before') @classmethod diff --git a/backend/app/schemas/edges.py b/backend/app/schemas/edges.py index 9c83d8a..8baa45b 100644 --- a/backend/app/schemas/edges.py +++ b/backend/app/schemas/edges.py @@ -17,7 +17,7 @@ class EdgeBase(BaseModel): animated: str = 'none' source_handle: str | None = None target_handle: str | None = None - waypoints: list | None = None + waypoints: list[dict[str, float]] | None = None @field_validator('animated', mode='before') @classmethod @@ -39,7 +39,7 @@ class EdgeUpdate(BaseModel): animated: str | None = None source_handle: str | None = None target_handle: str | None = None - waypoints: list | None = None + waypoints: list[dict[str, float]] | None = None @field_validator('animated', mode='before') @classmethod