Angola small refactoring
@@ -40,13 +40,11 @@ class Angola(HolidayBase):
country = "AO"
def _populate(self, year: int) -> None:
- super()._populate(year)
-
# Observed since 1975
# TODO do more research on history of Angolan holidays
-
if year <= 1974:
return
+ super()._populate(year)
self[date(year, JAN, 1)] = "Ano novo"
# Since 2018, if the following year's New Year's Day falls on a
@@ -84,7 +82,8 @@ class Angola(HolidayBase):
# the Monday or Friday is also a holiday
if self.observed and year >= 1995:
for k, v in list(self.items()):
- if k.year == year:
+ if k.year != year:
+ continue
if year <= 2017:
if k.weekday() == SUN:
self[k + rd(days=+1)] = v + " (Observed)"
