Skip to content

Commit

Permalink
Formatted all files with black
Browse files Browse the repository at this point in the history
  • Loading branch information
s-weigand committed Dec 4, 2020
1 parent 86caa14 commit dc0d9fc
Show file tree
Hide file tree
Showing 108 changed files with 2,798 additions and 1,439 deletions.
18 changes: 15 additions & 3 deletions holidays/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@
# License: MIT (see LICENSE file)
from holidays.countries import *
from holidays.constants import MON, TUE, WED, THU, FRI, SAT, SUN, WEEKEND
from holidays.constants import JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, \
NOV, DEC
from holidays.constants import (
JAN,
FEB,
MAR,
APR,
MAY,
JUN,
JUL,
AUG,
SEP,
OCT,
NOV,
DEC,
)
from holidays.holiday_base import HolidayBase, createHolidaySum
from holidays.utils import list_supported_countries, CountryHoliday

__version__ = '0.10.4'
__version__ = "0.10.4"
3 changes: 1 addition & 2 deletions holidays/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
MON, TUE, WED, THU, FRI, SAT, SUN = range(7)
WEEKEND = (SAT, SUN)

JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, \
NOV, DEC = range(1, 13)
JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC = range(1, 13)
13 changes: 11 additions & 2 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@
from .turkey import Turkey, TR, TUR
from .ukraine import Ukraine, UA, UKR
from .united_arab_emirates import UnitedArabEmirates, AE, ARE
from .united_kingdom import UnitedKingdom, UK, GB, England, Wales, Scotland,\
IsleOfMan, NorthernIreland, GBR
from .united_kingdom import (
UnitedKingdom,
UK,
GB,
England,
Wales,
Scotland,
IsleOfMan,
NorthernIreland,
GBR,
)
from .united_states import UnitedStates, US, USA
from .vietnam import Vietnam, VN, VNM
3 changes: 1 addition & 2 deletions holidays/countries/angola.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@


class Angola(HolidayBase):

def __init__(self, **kwargs):
# https://www.officeholidays.com/countries/angola/
# https://www.timeanddate.com/holidays/angola/
self.country = 'AO'
self.country = "AO"
HolidayBase.__init__(self, **kwargs)

def _populate(self, year):
Expand Down
56 changes: 34 additions & 22 deletions holidays/countries/argentina.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
from dateutil.relativedelta import relativedelta as rd, FR, TH

from holidays.constants import WEEKEND
from holidays.constants import JAN, MAR, APR, MAY, JUN, JUL, AUG, OCT, \
NOV, DEC
from holidays.constants import JAN, MAR, APR, MAY, JUN, JUL, AUG, OCT, NOV, DEC
from holidays.holiday_base import HolidayBase


Expand All @@ -29,7 +28,7 @@ class Argentina(HolidayBase):
# https://www.clarin.com/feriados/

def __init__(self, **kwargs):
self.country = 'AR'
self.country = "AR"
HolidayBase.__init__(self, **kwargs)

def _populate(self, year):
Expand All @@ -45,8 +44,10 @@ def _populate(self, year):
self[easter(year) - rd(days=47)] = name

# Memory's National Day for the Truth and Justice
name = "Día Nacional de la Memoria por la Verdad y la Justicia " \
"[Memory's National Day for the Truth and Justice]"
name = (
"Día Nacional de la Memoria por la Verdad y la Justicia "
"[Memory's National Day for the Truth and Justice]"
)

if not self.observed and date(year, MAR, 24).weekday() in WEEKEND:
pass
Expand All @@ -56,7 +57,7 @@ def _populate(self, year):
# Holy Week
name_thu = "Semana Santa (Jueves Santo) [Holy day (Holy Thursday)]"
name_fri = "Semana Santa (Viernes Santo) [Holy day (Holy Friday)]"
name_easter = 'Día de Pascuas [Easter Day]'
name_easter = "Día de Pascuas [Easter Day]"

self[easter(year) + rd(weekday=TH(-1))] = name_thu
self[easter(year) + rd(weekday=FR(-1))] = name_fri
Expand All @@ -70,10 +71,12 @@ def _populate(self, year):
if not self.observed and date(year, APR, 2).weekday() in WEEKEND:
pass
else:
self[date(year, APR, 2)] = "Día del Veterano y de los Caidos " \
"en la Guerra de Malvinas [Veterans" \
" Day and the Fallen in the" \
self[date(year, APR, 2)] = (
"Día del Veterano y de los Caidos "
"en la Guerra de Malvinas [Veterans"
" Day and the Fallen in the"
" Malvinas War]"
)

# Labor Day
name = "Día del Trabajo [Labour Day]"
Expand All @@ -90,18 +93,22 @@ def _populate(self, year):
self[date(year, MAY, 25)] = name

# Day Pass to the Immortality of General Martín Miguel de Güemes.
name = "Día Pase a la Inmortalidad " \
"del General Martín Miguel de Güemes [Day Pass " \
"to the Immortality of General Martín Miguel de Güemes]"
name = (
"Día Pase a la Inmortalidad "
"del General Martín Miguel de Güemes [Day Pass "
"to the Immortality of General Martín Miguel de Güemes]"
)
if not self.observed and date(year, JUN, 17).weekday() in WEEKEND:
pass
else:
self[date(year, JUN, 17)] = name

# Day Pass to the Immortality of General D. Manuel Belgrano.
name = "Día Pase a la Inmortalidad " \
"del General D. Manuel Belgrano [Day Pass " \
"to the Immortality of General D. Manuel Belgrano]"
name = (
"Día Pase a la Inmortalidad "
"del General D. Manuel Belgrano [Day Pass "
"to the Immortality of General D. Manuel Belgrano]"
)
if not self.observed and date(year, JUN, 20).weekday() in WEEKEND:
pass
else:
Expand All @@ -115,9 +122,11 @@ def _populate(self, year):
self[date(year, JUL, 9)] = name

# Day Pass to the Immortality of General D. José de San Martin
name = "Día Pase a la Inmortalidad " \
"del General D. José de San Martin [Day Pass " \
"to the Immortality of General D. José de San Martin]"
name = (
"Día Pase a la Inmortalidad "
"del General D. José de San Martin [Day Pass "
"to the Immortality of General D. José de San Martin]"
)
if not self.observed and date(year, AUG, 17).weekday() in WEEKEND:
pass
else:
Expand All @@ -129,9 +138,11 @@ def _populate(self, year):
elif year < 2010:
self[date(year, OCT, 12)] = "Día de la Raza [Columbus day]"
else:
self[date(year, OCT, 12)] = "Día del Respeto a la Diversidad" \
" Cultural [Respect for" \
self[date(year, OCT, 12)] = (
"Día del Respeto a la Diversidad"
" Cultural [Respect for"
" Cultural Diversity Day]"
)
# National Sovereignty Day
name = "Día Nacional de la Soberanía [National Sovereignty Day]"
if not self.observed and date(year, NOV, 20).weekday() in WEEKEND:
Expand All @@ -143,8 +154,9 @@ def _populate(self, year):
if not self.observed and date(year, DEC, 8).weekday() in WEEKEND:
pass
else:
self[date(year, DEC, 8)] = "La Inmaculada Concepción" \
" [Immaculate Conception]"
self[date(year, DEC, 8)] = (
"La Inmaculada Concepción" " [Immaculate Conception]"
)

# Christmas
self[date(year, DEC, 25)] = "Navidad [Christmas]"
Expand Down
21 changes: 14 additions & 7 deletions holidays/countries/aruba.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
from dateutil.easter import easter
from dateutil.relativedelta import relativedelta as rd, FR

from holidays.constants import JAN, MAR, APR, MAY, AUG, \
DEC
from holidays.constants import JAN, MAR, APR, MAY, AUG, DEC
from holidays.holiday_base import HolidayBase


Expand All @@ -26,7 +25,7 @@ class Aruba(HolidayBase):
# https://www.visitaruba.com/about-aruba/national-holidays-and-celebrations/

def __init__(self, **kwargs):
self.country = 'AW'
self.country = "AW"
HolidayBase.__init__(self, **kwargs)

def _populate(self, year):
Expand All @@ -37,18 +36,24 @@ def _populate(self, year):
self[date(year, JAN, 25)] = "Dia Di Betico [Betico Day]"

# Carnaval Monday
self[easter(year) + rd(days=-48)] = "Dialuna di Carnaval \
self[
easter(year) + rd(days=-48)
] = "Dialuna di Carnaval \
[Carnaval Monday]"

# Dia di Himno y Bandera
self[date(year, MAR, 18)] = "Dia di Himno y Bandera \
self[
date(year, MAR, 18)
] = "Dia di Himno y Bandera \
[National Anthem & Flag Day]"

# Good Friday
self[easter(year) + rd(weekday=FR(-1))] = "Bierna Santo [Good Friday]"

# Easter Monday
self[easter(year) + rd(days=1)] = "Di Dos Dia di Pasco di Resureccion \
self[
easter(year) + rd(days=1)
] = "Di Dos Dia di Pasco di Resureccion \
[Easter Monday]"

# King's Day
Expand Down Expand Up @@ -83,7 +88,9 @@ def _populate(self, year):
self[date(year, DEC, 25)] = "Pasco di Nacemento [Christmas]"

# Second Christmas
self[date(year, DEC, 26)] = "Di Dos Dia di Pasco di \
self[
date(year, DEC, 26)
] = "Di Dos Dia di Pasco di \
Nacemento [Second Christmas]"


Expand Down
Loading

0 comments on commit dc0d9fc

Please sign in to comment.