Fixed Py2.7 import clash
import inspect
-import holidays.countries as countries
+import holidays
from datetime import date
def list_supported_countries():
"""List all supported countries incl. their abbreviation."""
return [name for name, obj in
- inspect.getmembers(countries, inspect.isclass)]
+ inspect.getmembers(holidays.countries, inspect.isclass)]
def CountryHoliday(country, years=[], prov=None, state=None, expand=True,
observed=True):
try:
- country_classes = inspect.getmembers(countries, inspect.isclass)
+ country_classes = inspect.getmembers(holidays.countries,
+ inspect.isclass)
country = next(obj for name, obj in country_classes if name == country)
country_holiday = country(years=years, prov=prov, state=state,
expand=expand, observed=observed)
