Skip to content

Commit

Permalink
Cleanup __get_sorted_sections
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Aug 2, 2021
1 parent 80cc1cb commit 5e07895
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/webqueue2api/parser/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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

Expand Down

0 comments on commit 5e07895

Please sign in to comment.