Skip to content

Commit 2725b5a

Browse files
committed
Remove unneeded flags from draw_row() function
1 parent e59a9e4 commit 2725b5a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

generate_life_calendar.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,13 @@ def draw_row(ctx, pos_y, birthdate, date, box_size, x_margin, darken_until_date)
130130

131131
pos_x = x_margin
132132

133-
seen_birthday = False
134-
seen_newyear = False
135-
136133
for i in range(NUM_COLUMNS):
137134
fill = (1, 1, 1)
138135

139-
if (not seen_newyear) and is_current_week(date, 1, 1):
140-
fill = NEWYEAR_COLOUR
141-
seen_newyear = True
142-
143-
if (not seen_birthday) and is_current_week(date, birthdate.month, birthdate.day):
136+
if is_current_week(date, birthdate.month, birthdate.day):
144137
fill = BIRTHDAY_COLOUR
145-
seen_birthday = True
138+
elif is_current_week(date, 1, 1):
139+
fill = NEWYEAR_COLOUR
146140

147141
if darken_until_date and is_future(date, darken_until_date):
148142
fill = get_darkened_fill(fill)

0 commit comments

Comments
 (0)