diff --git a/AKModel/models.py b/AKModel/models.py index fe8bb84336ae80d9f525236ea83c9b8d8f138844..4cc9343d3aea4ad7e3113233826e368f6f1dd868 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -196,7 +196,7 @@ class Event(models.Model): yield current_block - def time_slot(self, *, time_slot_index, slots_in_an_hour=1.0): + def time_slot(self, *, time_slot_index: int, slots_in_an_hour: float = 1.0) -> "Availability": from AKModel.availability.models import Availability slot_duration = timedelta(hours=(1.0 / slots_in_an_hour)) @@ -206,7 +206,7 @@ class Event(models.Model): start=start, end=start + slot_duration) - def schedule_from_json(self, schedule): + def schedule_from_json(self, schedule: str) -> None: schedule = json.loads(schedule) slots_in_an_hour = schedule["input"]["timeslots"]["info"]["duration"]