making main less complex
This commit is contained in:
@@ -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[:]
|
||||
|
||||
Reference in New Issue
Block a user