repalced global MONTHS with local months
This commit is contained in:
		
							parent
							
								
									1c480360df
								
							
						
					
					
						commit
						9707095cc1
					
				
							
								
								
									
										12
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								main.py
									
									
									
									
									
								
							| @ -151,8 +151,8 @@ def process_day(events, year, month, day, day_events): | |||||||
|         events.append(event) |         events.append(event) | ||||||
|     return events |     return events | ||||||
| 
 | 
 | ||||||
| def process_month(MONTHS, monthly_events, year, month, week_of_month, week, events): | def process_month(months, monthly_events, year, month, week_of_month, week, events): | ||||||
|     """process one MONTHS of events""" |     """process one months of events""" | ||||||
|     for day_of_week, day in enumerate(week): |     for day_of_week, day in enumerate(week): | ||||||
|         if day > 0: |         if day > 0: | ||||||
|             """ |             """ | ||||||
| @ -166,14 +166,14 @@ def process_month(MONTHS, monthly_events, year, month, week_of_month, week, even | |||||||
|     return events |     return events | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def process_months(MONTHS, monthly_events, year): | def process_months(months, monthly_events, year): | ||||||
|     """process full year of MONTHS and return list of events""" |     """process full year of months and return list of events""" | ||||||
|     events = [] |     events = [] | ||||||
|     for month in range(1, 13): |     for month in range(1, 13): | ||||||
|         debug_print(f"MONTH: {month}", DEBUG) |         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) |             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 |     return events | ||||||
| 
 | 
 | ||||||
| @click.command() | @click.command() | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user