repalced global MONTHS with local months

This commit is contained in:
Fredrick W. Warren 2024-12-29 10:01:32 -07:00
parent 1c480360df
commit 9707095cc1

12
main.py
View File

@ -151,8 +151,8 @@ def process_day(events, year, month, day, day_events):
events.append(event)
return events
def process_month(MONTHS, monthly_events, year, month, week_of_month, week, events):
"""process one MONTHS of events"""
def process_month(months, monthly_events, year, month, week_of_month, week, events):
"""process one months of events"""
for day_of_week, day in enumerate(week):
if day > 0:
"""
@ -166,14 +166,14 @@ def process_month(MONTHS, monthly_events, year, month, week_of_month, week, even
return events
def process_months(MONTHS, monthly_events, year):
"""process full year of MONTHS and return list of events"""
def process_months(months, monthly_events, year):
"""process full year of months and return list of events"""
events = []
for month in range(1, 13):
debug_print(f"MONTH: {month}", DEBUG)
for week_of_month, week in enumerate(MONTHS[month]):
for week_of_month, week in enumerate(months[month]):
debug_print(f"{week_of_month} {week}", DEBUG)
events = process_month(MONTHS, monthly_events, year, month, week_of_month, week, events)
events = process_month(months, monthly_events, year, month, week_of_month, week, events)
return events
@click.command()