From 12402efb9df9f6047cd27ea47d7e4e0f07709384 Mon Sep 17 00:00:00 2001
From: Simon Bjurek <simbj106@student.liu.se>
Date: Fri, 31 Jan 2025 16:43:15 +0100
Subject: [PATCH] fixed start_times setter

---
 b_asic/schedule.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/b_asic/schedule.py b/b_asic/schedule.py
index acb6572b..4c7f01b6 100644
--- a/b_asic/schedule.py
+++ b/b_asic/schedule.py
@@ -388,8 +388,11 @@ class Schedule:
 
     @start_times.setter
     def start_times(self, start_times: dict[GraphID, int]) -> None:
-        if not isinstance(start_times, dict[GraphID, int]):
-            raise TypeError("start_times must be a dict[GraphID, int]")
+        if not isinstance(start_times, dict):
+            raise TypeError("start_times must be a dict")
+        for key, value in start_times.items():
+            if not isinstance(key, str) or not isinstance(value, int):
+                raise TypeError("start_times must be a dict[GraphID, int]")
         self._start_times = start_times
 
     @property
-- 
GitLab