Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class Wales(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Wales'
HolidayBase.__init__(self, **kwargs)
class Scotland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Scotland'
HolidayBase.__init__(self, **kwargs)
class IsleOfMan(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Isle of Man'
HolidayBase.__init__(self, **kwargs)
class NorthernIreland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Northern Ireland'
HolidayBase.__init__(self, **kwargs)
class Ireland(UnitedKingdom):
def __init__(self, **kwargs):
if self.country != 'Ireland':
if year == 1977:
self[date(year, 6, 7)] = "Silver Jubilee of Elizabeth II"
elif year == 1981:
self[date(year, 7, 29)] = "Wedding of Charles and Diana"
elif year == 1999:
self[date(year, 12, 31)] = "Millennium Celebrations"
elif year == 2002:
self[date(year, 6, 3)] = "Golden Jubilee of Elizabeth II"
elif year == 2011:
self[date(year, 4, 29)] = "Wedding of William and Catherine"
elif year == 2012:
self[date(year, 6, 5)] = "Diamond Jubilee of Elizabeth II"
class UK(UnitedKingdom):
pass
class England(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'England'
HolidayBase.__init__(self, **kwargs)
class Wales(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Wales'
HolidayBase.__init__(self, **kwargs)
class IsleOfMan(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Isle of Man'
HolidayBase.__init__(self, **kwargs)
class NorthernIreland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Northern Ireland'
HolidayBase.__init__(self, **kwargs)
class Ireland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Ireland'
HolidayBase.__init__(self, **kwargs)
class IE(Ireland):
pass
class Spain(HolidayBase):
PROVINCES = ['AND', 'ARG', 'AST', 'CAN', 'CAM', 'CAL', 'CAT', 'CVA',
'EXT', 'GAL', 'IBA', 'ICA', 'MAD', 'MUR', 'NAV', 'PVA', 'RIO']
def __init__(self, **kwargs):
self.country = 'ES'
class England(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'England'
HolidayBase.__init__(self, **kwargs)
class Wales(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Wales'
HolidayBase.__init__(self, **kwargs)
class Scotland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Scotland'
HolidayBase.__init__(self, **kwargs)
class IsleOfMan(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Isle of Man'
HolidayBase.__init__(self, **kwargs)
class NorthernIreland(UnitedKingdom):
def __init__(self, **kwargs):
elif year == 2012:
self[date(year, 6, 5)] = "Diamond Jubilee of Elizabeth II"
class UK(UnitedKingdom):
pass
class England(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'England'
HolidayBase.__init__(self, **kwargs)
class Wales(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Wales'
HolidayBase.__init__(self, **kwargs)
class Scotland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Scotland'
HolidayBase.__init__(self, **kwargs)
class IsleOfMan(UnitedKingdom):
def __init__(self, **kwargs):
self[date(year, 7, 29)] = "Wedding of Charles and Diana"
elif year == 1999:
self[date(year, 12, 31)] = "Millennium Celebrations"
elif year == 2002:
self[date(year, 6, 3)] = "Golden Jubilee of Elizabeth II"
elif year == 2011:
self[date(year, 4, 29)] = "Wedding of William and Catherine"
elif year == 2012:
self[date(year, 6, 5)] = "Diamond Jubilee of Elizabeth II"
class UK(UnitedKingdom):
pass
class England(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'England'
HolidayBase.__init__(self, **kwargs)
class Wales(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Wales'
HolidayBase.__init__(self, **kwargs)
class Scotland(UnitedKingdom):
def __init__(self, **kwargs):
class Scotland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Scotland'
HolidayBase.__init__(self, **kwargs)
class IsleOfMan(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Isle of Man'
HolidayBase.__init__(self, **kwargs)
class NorthernIreland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Northern Ireland'
HolidayBase.__init__(self, **kwargs)
class Ireland(UnitedKingdom):
def __init__(self, **kwargs):
self.country = 'Ireland'
HolidayBase.__init__(self, **kwargs)
class IE(Ireland):
pass