Skip to content
Snippets Groups Projects
Commit 12402efb authored by Simon Bjurek's avatar Simon Bjurek
Browse files

fixed start_times setter

parent 5ec071d9
No related branches found
No related tags found
1 merge request!461Finalize earliest deadline scheduler
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment