From e4ddbd423702a9bc7620b5084258a8d218198e10 Mon Sep 17 00:00:00 2001 From: Cameron Brown Date: Sun, 1 Sep 2024 20:32:25 -0400 Subject: [PATCH] src/reports.py: Use range instead of calendar.Day to support < 3.12 --- src/reports.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/reports.py b/src/reports.py index d63753c..994aa17 100644 --- a/src/reports.py +++ b/src/reports.py @@ -41,6 +41,10 @@ class Column(IntEnum): SCORE_COLUMN = 8 +# Effectively: [calendar.MONDAY, calendar.TUESDAY, ..., calendar.SUNDAY] +EVERYDAY = list(range(7)) + + @dataclass class WeekColumn: """ @@ -931,7 +935,7 @@ async def refresh_sheet(self) -> None: ], ) - @run_on_weekday(day=[*calendar.Day], hour=6, minute=0) + @run_on_weekday(day=EVERYDAY, hour=6, minute=0) async def regular_refresh(self) -> None: await self.refresh_sheet()