making main less complex

This commit is contained in:
2024-06-19 22:53:43 +02:00
parent bb5364d021
commit a54b19b938
4 changed files with 63 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
from pathlib import Path
from .TimeSlot import TimeSlot
from model.TimeSlot import TimeSlot
import json
@@ -30,11 +30,9 @@ class DataStore:
def add_time_slot(self, time_slot: TimeSlot):
self._time_slots.append(time_slot)
self.write_update()
def remove_time_slot(self, time_slot: TimeSlot):
self._time_slots.remove(time_slot)
self.write_update()
def get_all_time_slots(self):
def get_all_time_slots(self) -> list[TimeSlot]:
return self._time_slots[:]