ruff formatted

This commit is contained in:
Tim Bendt
2025-05-08 12:09:43 -06:00
parent e0e7e6ac76
commit 125f500769
17 changed files with 485 additions and 286 deletions

View File

@@ -2,6 +2,7 @@ from datetime import datetime, timedelta
import re
from typing import List, Dict
def group_envelopes_by_date(envelopes: List[Dict]) -> List[Dict]:
"""Group envelopes by date and add headers for each group."""
grouped_envelopes = []
@@ -30,7 +31,7 @@ def group_envelopes_by_date(envelopes: List[Dict]) -> List[Dict]:
current_group = None
for envelope in envelopes:
envelope_date = re.sub(r"[\+\-]\d\d:\d\d", "", envelope['date'])
envelope_date = re.sub(r"[\+\-]\d\d:\d\d", "", envelope["date"])
envelope_date = datetime.strptime(envelope_date, "%Y-%m-%d %H:%M")
group_label = get_group_label(envelope_date)
if group_label != current_group: