From ca1915e3e139dca6d1f004a3fd8c0a0908955962 Mon Sep 17 00:00:00 2001
From: Neda Moeini <neda.moeini@geant.org>
Date: Mon, 28 Oct 2024 13:20:27 +0100
Subject: [PATCH] Fix the ruff errors.

---
 gso/workflows/shared.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gso/workflows/shared.py b/gso/workflows/shared.py
index 9cc61837..8504deba 100644
--- a/gso/workflows/shared.py
+++ b/gso/workflows/shared.py
@@ -1,7 +1,7 @@
 """Shared functions for the workflows."""
 
 from collections.abc import Generator
-from typing import TypeAlias, cast
+from typing import cast
 
 from orchestrator.domain.base import ProductBlockModel
 from orchestrator.forms import FormPage
@@ -11,12 +11,11 @@ from pydantic import ConfigDict
 
 def summary_form(product_name: str, summary_data: dict) -> Generator:
     """Generate a summary form for the product."""
-    ProductSummary: TypeAlias = cast(type[MigrationSummary], migration_summary(summary_data))  # type: ignore[no-redef]
 
     class SummaryForm(FormPage):
         model_config = ConfigDict(title=f"{product_name} summary")
 
-        product_summary: ProductSummary
+        product_summary: cast(type[MigrationSummary], migration_summary(summary_data))  # type: ignore[valid-type]
 
     yield SummaryForm
 
-- 
GitLab