updated debug print

This commit is contained in:
fwarren committed 2024-12-29 07:41:15 -07:00
1 parent a77019638d
commit f786cceed1
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -30,4 +30,4 @@ EVENT_LIST = ( # ------------- --------
# (--------, [- ], 18, 00, 20, 00, "Main Campus", "Youth Group", "South County Youth Group 6:00pm", ""),
)
DEBUG = False
DEBUG = True
+3 -3
View File
@@ -13,7 +13,7 @@ from dataclass_csv import DataclassWriter
from events import EVENT_LIST, YEAR, DEBUG
def debug_print(data, condition=True):
def debug_print(data, condition=True, end="\n"):
"""Conditionally print data using pprint.
Args:
@@ -21,7 +21,7 @@ def debug_print(data, condition=True):
condition: A boolean value. If True, the data will be printed.
"""
if condition:
pprint(data)
print(data, end=end)
"""
@@ -142,7 +142,7 @@ def process_month(MONTHS, monthly_events, week_of_month, week, events):
month, week_of_month, day_of_week, day
use monthly_events[day_of_week]
"""
debug_print(f" {day_of_week}-{day:02d}", DEBUG)
debug_print(f" {day_of_week}-{day:02d}", DEBUG," ")
day_events = [x[1:] for x in monthly_events[day_of_week] if week_of_month + 1 in x[0]]
debug_print(day_events, DEBUG)
debug_print("", DEBUG)