diff --git a/b_asic/schedule.py b/b_asic/schedule.py index acb6572b34044f7e4b70e048c26e78a9ba1f52d9..4c7f01b6dea0be070b775e84605c0b0b84363ab8 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