diff --git a/src/webqueue2api/parser/item.py b/src/webqueue2api/parser/item.py index bcecac8..1832758 100644 --- a/src/webqueue2api/parser/item.py +++ b/src/webqueue2api/parser/item.py @@ -278,16 +278,13 @@ def __add_initial_message_headers(self, initial_message: dict) -> dict: return initial_message def __get_sorted_sections(self, sectionsList: list) -> list: - """Sorts the sections chronologically by datetime - - Example: - [example] need to do + """Returns list of sections sorted chronologically. Args: - sections (list): the list of sections to be sorted + sections (list): List of sections to be sorted. Returns: - list: a list of sections sorted by datetime + list: List of sections sorted chronologically. """ sectionsLength = len(sectionsList) sortedSections = [] @@ -304,9 +301,6 @@ def __get_sorted_sections(self, sectionsList: list) -> list: if iteration == 0: oldestSection = currentSection - - #datetime.datetime.strptime(date_time_str, '%Y-%m-%d %H:%M:%S.%f') - elif parse(currentSection["datetime"]) < parse(oldestSection["datetime"]): oldestSection = currentSection