From bb85bffe2db2dc6af1cea074a6ec0e0035ac92ca Mon Sep 17 00:00:00 2001 From: elizaaverywilson Date: Mon, 17 Oct 2022 23:04:26 -0500 Subject: [PATCH] Added Event type to API, added type hint --- icalevents/icalevents.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/icalevents/icalevents.py b/icalevents/icalevents.py index a9ef0ed..c092be5 100644 --- a/icalevents/icalevents.py +++ b/icalevents/icalevents.py @@ -1,6 +1,6 @@ from threading import Lock, Thread -from .icalparser import parse_events +from .icalparser import parse_events, Event from .icaldownload import ICalDownload @@ -21,7 +21,7 @@ def events( fix_apple=False, http=None, sort=True, -): +) -> list[Event]: """ Get all events form the given iCal URL occurring in the given time range. @@ -31,8 +31,9 @@ def events( :param start: start date (see dateutils.date) :param end: end date (see dateutils.date) :param fix_apple: fix known Apple iCal issues - :return: events as list of dictionaries :sort: sorts events by start time + + :return: events """ found_events = []