diff --git a/.gitignore b/.gitignore index 91c6c3b05..89f53370c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ build/* coverage.lcov dist/ docs/build +docs/source/_autosummary holidays/locale/pot/*.pot !holidays/locale/pot/UA.pot MANIFEST diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b73627cc7..030efc77b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,11 +6,17 @@ repos: - id: check-builtin-literals - id: check-yaml - id: end-of-file-fixer + exclude_types: + - rst - id: fix-encoding-pragma - args: [--remove] + args: + - --remove - id: mixed-line-ending - args: [--fix=lf] + args: + - --fix=lf - id: trailing-whitespace + exclude_types: + - rst - repo: https://github.com/python/black rev: 23.11.0 @@ -41,8 +47,8 @@ repos: additional_dependencies: [types-all] args: - --ignore-missing-imports - - --show-error-codes - --implicit-optional + - --show-error-codes - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 @@ -53,10 +59,12 @@ repos: rev: v6.2.0 hooks: - id: rstcheck - additional_dependencies: [rstcheck, sphinx] + additional_dependencies: + - rstcheck + - sphinx - repo: https://github.com/tox-dev/tox-ini-fmt - rev: "1.3.1" + rev: '1.3.1' hooks: - id: tox-ini-fmt diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d62f6d3f3..b8310144c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -77,7 +77,7 @@ Use pytest directly if you need ``-s`` option: Localization --------------------------- +------------ .. _ISO 639-1 codes: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes In order to add or update existing holiday names translation you'll need to diff --git a/Makefile b/Makefile index 48b625452..0ac6a5904 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ clean: find . -name *.pyc -delete rm -rf .mypy_cache/* rm -rf .pytest_cache/* + rm -rf docs/build/* coverage: pytest --cov=. --cov-config=pyproject.toml --cov-report term-missing --dist loadscope --no-cov-on-fail --numprocesses auto diff --git a/docs/source/conf.py b/docs/source/conf.py index f8251ceec..69554b8c4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -189,7 +189,7 @@ "undoc-members": True, # 'private-members': False, # default # 'special-members': False, # default - "inherited-members": True, + "inherited-members": False, # Disabled due to performance concerns. "show-inheritance": True, # 'ignore-module-all': False, # default # 'imported-members': False, # default diff --git a/docs/source/index.rst b/docs/source/index.rst index dfd878e0e..aa65c10fb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,6 +18,7 @@ examples contributing api + Supported Entities changelog genindex diff --git a/docs/source/modules.rst b/docs/source/modules.rst new file mode 100644 index 000000000..a076b4ef0 --- /dev/null +++ b/docs/source/modules.rst @@ -0,0 +1,9 @@ +Supported Entities +================== + +.. autosummary:: + :toctree: _autosummary + :recursive: + + holidays.countries + holidays.financial diff --git a/holidays/calendars/__init__.py b/holidays/calendars/__init__.py index 97fbc5031..a47d07fa8 100644 --- a/holidays/calendars/__init__.py +++ b/holidays/calendars/__init__.py @@ -11,12 +11,12 @@ # flake8: noqa: F401 -from holidays.calendars.buddhist import _CustomBuddhistHolidays, _BuddhistLunisolar -from holidays.calendars.chinese import _CustomChineseHolidays, _ChineseLunisolar +from holidays.calendars.buddhist import _BuddhistLunisolar, _CustomBuddhistHolidays +from holidays.calendars.chinese import _ChineseLunisolar, _CustomChineseHolidays from holidays.calendars.custom import _CustomCalendar from holidays.calendars.gregorian import GREGORIAN_CALENDAR from holidays.calendars.hebrew import _HebrewLunisolar -from holidays.calendars.hindu import _HinduLunisolar, _CustomHinduHolidays +from holidays.calendars.hindu import _CustomHinduHolidays, _HinduLunisolar from holidays.calendars.islamic import _CustomIslamicHolidays, _IslamicLunar from holidays.calendars.julian import JULIAN_CALENDAR from holidays.calendars.julian_revised import JULIAN_REVISED_CALENDAR diff --git a/holidays/countries/algeria.py b/holidays/countries/algeria.py index 458ccbbeb..ff81a68e7 100644 --- a/holidays/countries/algeria.py +++ b/holidays/countries/algeria.py @@ -11,7 +11,7 @@ from gettext import gettext as tr -from holidays.groups import IslamicHolidays, InternationalHolidays +from holidays.groups import InternationalHolidays, IslamicHolidays from holidays.holiday_base import HolidayBase diff --git a/holidays/countries/angola.py b/holidays/countries/angola.py index e2fe6e4bb..9db6159f3 100644 --- a/holidays/countries/angola.py +++ b/holidays/countries/angola.py @@ -26,18 +26,18 @@ class Angola(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays): """ References: - - https://en.wikipedia.org/wiki/Public_holidays_in_Angola - - http://www.siac.gv.ao/downloads/181029-Lei-Feriados.pdf - - [Decree #5/75] https://www.lexlink.eu/FileGet.aspx?FileId=3023486 - - [Decree #92/80] https://www.lexlink.eu/FileGet.aspx?FileId=3023473 - - [Decree #7/92] https://www.lexlink.eu/FileGet.aspx?FileId=3023485 - - [Law #16/96] https://www.lexlink.eu/FileGet.aspx?FileId=3037036 - - [Law #1/01] https://www.lexlink.eu/FileGet.aspx?FileId=3029035 - - [Law #7/03] https://www.lexlink.eu/FileGet.aspx?FileId=3002131 - - [Law #10/11] https://equadros.gov.ao/documents/40468/0/lei_10_11-1+%281%29.pdf - - [Law #11/18] https://equadros.gov.ao/documents/40468/0/Lei_no_11-18+%281%29.pdf - - https://www.officeholidays.com/countries/angola/ - - https://www.timeanddate.com/holidays/angola/ + - https://en.wikipedia.org/wiki/Public_holidays_in_Angola + - http://www.siac.gv.ao/downloads/181029-Lei-Feriados.pdf + - `Decree #5/75 `_ + - [Decree #92/80] https://www.lexlink.eu/FileGet.aspx?FileId=3023473 + - [Decree #7/92] https://www.lexlink.eu/FileGet.aspx?FileId=3023485 + - [Law #16/96] https://www.lexlink.eu/FileGet.aspx?FileId=3037036 + - [Law #1/01] https://www.lexlink.eu/FileGet.aspx?FileId=3029035 + - [Law #7/03] https://www.lexlink.eu/FileGet.aspx?FileId=3002131 + - [Law #10/11] https://equadros.gov.ao/documents/40468/0/lei_10_11-1+%281%29.pdf + - [Law #11/18] https://equadros.gov.ao/documents/40468/0/Lei_no_11-18+%281%29.pdf + - https://www.officeholidays.com/countries/angola/ + - https://www.timeanddate.com/holidays/angola/ """ country = "AO" diff --git a/holidays/countries/aruba.py b/holidays/countries/aruba.py index 73b0dcb26..c4f8621b5 100644 --- a/holidays/countries/aruba.py +++ b/holidays/countries/aruba.py @@ -20,12 +20,12 @@ class Aruba(HolidayBase, ChristianHolidays, InternationalHolidays): """ - https://www.government.aw/information-public-services/hiring-people_47940/item/holidays_43823.html # noqa: E501 - https://www.overheid.aw/informatie-dienstverlening/ondernemen-en-werken-subthemas_46970/item/feestdagen_37375.html # noqa: E501 - https://www.gobierno.aw/informacion-tocante-servicio/haci-negoshi-y-traha-sub-topics_47789/item/dia-di-fiesta_41242.html # noqa: E501 + https://www.government.aw/information-public-services/hiring-people_47940/item/holidays_43823.html + https://www.overheid.aw/informatie-dienstverlening/ondernemen-en-werken-subthemas_46970/item/feestdagen_37375.html + https://www.gobierno.aw/informacion-tocante-servicio/haci-negoshi-y-traha-sub-topics_47789/item/dia-di-fiesta_41242.html https://www.visitaruba.com/about-aruba/national-holidays-and-celebrations/ https://www.arubatoday.com/we-celebrate-our-national-hero-betico-croes/ - https://www.caribbeannewsglobal.com/carnival-monday-remains-a-festive-day-in-aruba/ # noqa: E501 + https://www.caribbeannewsglobal.com/carnival-monday-remains-a-festive-day-in-aruba/ https://www.aruba.com/us/calendar/national-anthem-and-flag-day """ diff --git a/holidays/countries/bangladesh.py b/holidays/countries/bangladesh.py index 02b971d07..971cffb79 100644 --- a/holidays/countries/bangladesh.py +++ b/holidays/countries/bangladesh.py @@ -16,8 +16,9 @@ class Bangladesh(HolidayBase, InternationalHolidays): """ - https://mopa.gov.bd/sites/default/files/files/mopa.gov.bd/public_holiday/61c35b73_e335_462a_9bcf_4695b23b6d82/reg4-2019-212.PDF - https://en.wikipedia.org/wiki/Public_holidays_in_Bangladesh + References: + - https://mopa.gov.bd/sites/default/files/files/mopa.gov.bd/public_holiday/61c35b73_e335_462a_9bcf_4695b23b6d82/reg4-2019-212.PDF # noqa: E501 + - https://en.wikipedia.org/wiki/Public_holidays_in_Bangladesh """ country = "BD" diff --git a/holidays/countries/belarus.py b/holidays/countries/belarus.py index 927ceab3c..f611a18a2 100644 --- a/holidays/countries/belarus.py +++ b/holidays/countries/belarus.py @@ -22,11 +22,11 @@ class Belarus(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolid Belarus holidays. References: - - http://president.gov.by/en/holidays_en/ - - http://www.belarus.by/en/about-belarus/national-holidays - - http://laws.newsby.org/documents/ukazp/pos05/ukaz05806.htm - - http://president.gov.by/uploads/documents/2019/464uk.pdf - - https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8%D0%BA%D0%B8_%D0%91%D0%B5%D0%BB%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%B8%D0%B8 # noqa: E501 + - http://president.gov.by/en/holidays_en/ + - http://www.belarus.by/en/about-belarus/national-holidays + - http://laws.newsby.org/documents/ukazp/pos05/ukaz05806.htm + - http://president.gov.by/uploads/documents/2019/464uk.pdf + - https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B0%D0%B7%D0%B4%D0%BD%D0%B8%D0%BA%D0%B8_%D0%91%D0%B5%D0%BB%D0%BE%D1%80%D1%83%D1%81%D1%81%D0%B8%D0%B8 # noqa: E501 """ country = "BY" diff --git a/holidays/countries/brazil.py b/holidays/countries/brazil.py index 48ebef72b..0870c63cc 100644 --- a/holidays/countries/brazil.py +++ b/holidays/countries/brazil.py @@ -21,11 +21,9 @@ class Brazil(HolidayBase, ChristianHolidays, InternationalHolidays): """ References: - - https://pt.wikipedia.org/wiki/Feriados_no_Brasil - - Decreto n. 155-B, de 14.01.1890: - https://www2.camara.leg.br/legin/fed/decret/1824-1899/decreto-155-b-14-janeiro-1890-517534-publicacaooriginal-1-pe.html - - Decreto n. 19.488, de 15.12.1930: - https://www2.camara.leg.br/legin/fed/decret/1930-1939/decreto-19488-15-dezembro-1930-508040-republicacao-85201-pe.html + - https://pt.wikipedia.org/wiki/Feriados_no_Brasil + - `Decreto n. 155-B, de 14.01.1890 `_ # noqa: E501 + - `Decreto n. 19.488, de 15.12.1930 `_ # noqa: E501 """ country = "BR" diff --git a/holidays/countries/canada.py b/holidays/countries/canada.py index 65a38b763..43577af17 100644 --- a/holidays/countries/canada.py +++ b/holidays/countries/canada.py @@ -28,15 +28,15 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays): """ References: - - https://en.wikipedia.org/wiki/Public_holidays_in_Canada - - https://web.archive.org/web/20130703014214/http://www.hrsdc.gc.ca/eng/labour/overviews/employment_standards/holidays.shtml # noqa: E501 - - https://www.alberta.ca/alberta-general-holidays - - https://www2.gov.bc.ca/gov/content/employment-business/employment-standards-advice/employment-standards/statutory-holidays # noqa: E501 - - http://web2.gov.mb.ca/laws/statutes/ccsm/r120e.php - - https://www2.gnb.ca/content/gnb/en/departments/elg/local_government/content/governance/content/days_of_rest_act.html # noqa: E501 - - https://www.ontario.ca/document/your-guide-employment-standards-act-0/public-holidays - - https://www.officeholidays.com/countries/canada/ - - https://www.timeanddate.com/holidays/canada/ + - https://en.wikipedia.org/wiki/Public_holidays_in_Canada + - https://web.archive.org/web/20130703014214/http://www.hrsdc.gc.ca/eng/labour/overviews/employment_standards/holidays.shtml # noqa: E501 + - https://www.alberta.ca/alberta-general-holidays + - https://www2.gov.bc.ca/gov/content/employment-business/employment-standards-advice/employment-standards/statutory-holidays # noqa: E501 + - http://web2.gov.mb.ca/laws/statutes/ccsm/r120e.php + - https://www2.gnb.ca/content/gnb/en/departments/elg/local_government/content/governance/content/days_of_rest_act.html # noqa: E501 + - https://www.ontario.ca/document/your-guide-employment-standards-act-0/public-holidays + - https://www.officeholidays.com/countries/canada/ + - https://www.timeanddate.com/holidays/canada/ """ country = "CA" diff --git a/holidays/countries/china.py b/holidays/countries/china.py index 09d6888d3..75682d758 100644 --- a/holidays/countries/china.py +++ b/holidays/countries/china.py @@ -22,43 +22,42 @@ class China(HolidayBase, ChineseCalendarHolidays, InternationalHolidays, StaticHolidays): """ References: - - https://en.wikipedia.org/wiki/Public_holidays_in_China - - https://zh.wikipedia.org/wiki/中华人民共和国节日与公众假期 - - https://www.gov.cn/gongbao/content/2023/content_5736714.htm # 2023 - - https://www.gov.cn/gongbao/content/2021/content_5651728.htm # 2022 - - https://www.gov.cn/gongbao/content/2020/content_5567750.htm # 2021 - - https://www.gov.cn/gongbao/content/2019/content_5459138.htm # 2020 - - https://www.gov.cn/gongbao/content/2018/content_5350046.htm # 2019 - - https://www.gov.cn/gongbao/content/2017/content_5248221.htm # 2018 - - https://www.gov.cn/gongbao/content/2016/content_5148793.htm # 2017 - - https://www.gov.cn/gongbao/content/2016/content_2979719.htm # 2016 - - https://www.gov.cn/gongbao/content/2015/content_2799019.htm # 2015 - - https://www.gov.cn/gongbao/content/2014/content_2561299.htm # 2014 - - https://www.gov.cn/gongbao/content/2012/content_2292057.htm # 2013 - - https://www.gov.cn/gongbao/content/2011/content_2020918.htm # 2012 - - https://www.gov.cn/gongbao/content/2010/content_1765282.htm # 2011 - - https://www.gov.cn/gongbao/content/2009/content_1487011.htm # 2010 - - https://www.gov.cn/gongbao/content/2008/content_1175823.htm # 2009 - - https://www.gov.cn/gongbao/content/2008/content_859870.htm # 2008 - - https://www.gov.cn/gongbao/content/2007/content_503397.htm # 2007 - - https://zh.wikisource.org/wiki/国务院办公厅关于2006年部分节假日安排的通知 # 2006 - - https://zh.wikisource.org/wiki/国务院办公厅关于2005年部分节假日安排的通知 # 2005 - - https://zh.wikisource.org/wiki/国务院办公厅关于2004年部分节假日安排的通知 # 2004 - - https://zh.wikisource.org/wiki/国务院办公厅关于2003年部分节假日休息安排的通知 # 2003 - - https://zh.wikisource.org/wiki/国务院办公厅关于2002年部分节假日休息安排的通知 # 2002 - - https://zh.wikisource.org/wiki/国务院办公厅关于2001年春节、“五一”、“十一”放假安排的通知 # 2001 + - https://en.wikipedia.org/wiki/Public_holidays_in_China + - `Festivals and Public Holidays `_ + - `2023 `_ + - `2022 `_ + - `2021 `_ + - `2020 `_ + - `2019 `_ + - `2018 `_ + - `2017 `_ + - `2016 `_ + - `2015 `_ + - `2014 `_ + - `2013 `_ + - `2012 `_ + - `2011 `_ + - `2010 `_ + - `2009 `_ + - `2008 `_ + - `2007 `_ + - `2006 `_ + - `2005 `_ + - `2004 `_ + - `2003 `_ + - `2002 `_ + - `2001 `_ Checked With: - - https://www.officeholidays.com/countries/china/2023 - - https://www.china-briefing.com/news/china-public-holiday-2023-schedule/ - - https://www.timeanddate.com/calendar/?year=2023&country=41 - - https://m.wannianli.tianqi.com/fangjiaanpai/2001.html # 2001-2010 + - https://www.officeholidays.com/countries/china/2023 + - https://www.china-briefing.com/news/china-public-holiday-2023-schedule/ + - https://www.timeanddate.com/calendar/?year=2023&country=41 + - `2001-2010 `_ Limitations: - - - Only checked with the official General Office of the State Council Notice from 2001 onwards. - - - Due to its complexity, need yearly checks 3-weeks before year's end each year. + - Only checked with the official General Office of the State Council Notice from 2001 + onwards. + - Due to its complexity, need yearly checks 3-weeks before year's end each year. """ country = "CN" diff --git a/holidays/countries/cuba.py b/holidays/countries/cuba.py index e3878367e..fdda63062 100644 --- a/holidays/countries/cuba.py +++ b/holidays/countries/cuba.py @@ -22,12 +22,12 @@ class Cuba(ObservedHolidayBase, ChristianHolidays, InternationalHolidays): 2007 (NOV 19): https://bit.ly/3oFbhaZ 2013 (DEC 20): https://bit.ly/3zoO3vC Note: for holidays that can be moved to a Monday if they fall on a - Sunday, between 1984 and 2013, the State Committee of Work and - Social Security would determine if they would be moved to the - Monday, or if they would stay on the Sunday, presumably depending - on quotas. After 2013, they always move to Monday. I could not - find any records of this, so I implemented this making it always - go to the next Monday. + Sunday, between 1984 and 2013, the State Committee of Work and + Social Security would determine if they would be moved to the + Monday, or if they would stay on the Sunday, presumably depending + on quotas. After 2013, they always move to Monday. I could not + find any records of this, so I implemented this making it always + go to the next Monday. """ country = "CU" diff --git a/holidays/countries/hungary.py b/holidays/countries/hungary.py index 306c0e460..0bcb8813a 100644 --- a/holidays/countries/hungary.py +++ b/holidays/countries/hungary.py @@ -19,24 +19,25 @@ class Hungary(HolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays): """ https://en.wikipedia.org/wiki/Public_holidays_in_Hungary + Codification dates: - - https://hvg.hu/gazdasag/20170307_Megszavaztak_munkaszuneti_nap_lett_a_nagypentek - - https://www.tankonyvtar.hu/hu/tartalom/historia/92-10/ch01.html#id496839 + - https://hvg.hu/gazdasag/20170307_Megszavaztak_munkaszuneti_nap_lett_a_nagypentek + - https://www.tankonyvtar.hu/hu/tartalom/historia/92-10/ch01.html#id496839 Substituted holidays official sources: - 2010 - https://njt.hu/jogszabaly/2009-20-20-1X - 2011 - https://njt.hu/jogszabaly/2010-7-20-2X - 2012 - https://njt.hu/jogszabaly/2011-39-20-2X - 2012-2013 - https://njt.hu/jogszabaly/2012-28-20-2X - 2014 - https://njt.hu/jogszabaly/2013-33-20-2X - 2015 - https://njt.hu/jogszabaly/2014-28-20-2X - 2016 - https://njt.hu/jogszabaly/2015-18-20-2X - 2018 - https://njt.hu/jogszabaly/2017-61-B0-15 - 2019 - https://njt.hu/jogszabaly/2018-6-20-53 - 2020 - https://njt.hu/jogszabaly/2019-7-20-53 - 2021 - https://njt.hu/jogszabaly/2020-14-20-7Q - 2022 - https://njt.hu/jogszabaly/2021-23-20-7Q - 2024 - https://njt.hu/jogszabaly/2023-15-20-8P + - `2010 `_ + - `2011 `_ + - `2012 `_ + - `2012-2013 `_ + - `2014 `_ + - `2015 `_ + - `2016 `_ + - `2018 `_ + - `2019 `_ + - `2020 `_ + - `2021 `_ + - `2022 `_ + - `2024 `_ """ country = "HU" diff --git a/holidays/countries/kazakhstan.py b/holidays/countries/kazakhstan.py index 76b53fdf2..1ae25240f 100644 --- a/holidays/countries/kazakhstan.py +++ b/holidays/countries/kazakhstan.py @@ -16,10 +16,11 @@ class Kazakhstan(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays): """ - 1. https://www.officeholidays.com/countries/kazakhstan/2020 - 2. https://egov.kz/cms/en/articles/holidays-calend - 3. https://en.wikipedia.org/wiki/Public_holidays_in_Kazakhstan - 4. https://adilet.zan.kz/rus/docs/Z010000267_/history + References: + - https://www.officeholidays.com/countries/kazakhstan/2020 + - https://egov.kz/cms/en/articles/holidays-calend + - https://en.wikipedia.org/wiki/Public_holidays_in_Kazakhstan + - https://adilet.zan.kz/rus/docs/Z010000267\_/history # noqa W605 """ country = "KZ" diff --git a/holidays/countries/madagascar.py b/holidays/countries/madagascar.py index 4de8af149..fc1590a0d 100644 --- a/holidays/countries/madagascar.py +++ b/holidays/countries/madagascar.py @@ -19,8 +19,9 @@ class Madagascar(HolidayBase, ChristianHolidays, InternationalHolidays): """ - https://www.officeholidays.com/countries/madagascar - https://www.timeanddate.com/holidays/madagascar/ + References: + - https://www.officeholidays.com/countries/madagascar + - https://www.timeanddate.com/holidays/madagascar/ """ country = "MG" diff --git a/holidays/countries/norway.py b/holidays/countries/norway.py index 7e5700808..b34dfa3f3 100644 --- a/holidays/countries/norway.py +++ b/holidays/countries/norway.py @@ -27,9 +27,9 @@ class Norway(HolidayBase, ChristianHolidays, InternationalHolidays): to not include sundays as a holiday. Primary sources: - https://lovdata.no/dokument/NL/lov/1947-04-26-1 - https://no.wikipedia.org/wiki/Helligdager_i_Norge - https://www.timeanddate.no/merkedag/norge/ + - https://lovdata.no/dokument/NL/lov/1947-04-26-1 + - https://no.wikipedia.org/wiki/Helligdager_i_Norge + - https://www.timeanddate.no/merkedag/norge/ """ country = "NO" @@ -38,9 +38,8 @@ class Norway(HolidayBase, ChristianHolidays, InternationalHolidays): def __init__(self, include_sundays=False, *args, **kwargs): """ - :param include_sundays: Whether to consider sundays as a holiday - (which they are in Norway) - :param kwargs: + :param include_sundays: + Whether to consider sundays as a holiday (which they are in Norway) """ self.include_sundays = include_sundays ChristianHolidays.__init__(self) diff --git a/holidays/countries/portugal.py b/holidays/countries/portugal.py index 605e088be..a8374101c 100644 --- a/holidays/countries/portugal.py +++ b/holidays/countries/portugal.py @@ -23,26 +23,17 @@ class Portugal(HolidayBase, ChristianHolidays, InternationalHolidays): in Portugal. References: - - - Based on: - https://en.wikipedia.org/wiki/Public_holidays_in_Portugal - - National Level: - - [Labour Day] - https://www.e-konomista.pt/dia-do-trabalhador/ - - [Portugal Day] - Decreto 17.171 - - [Restoration of Independence Day] - Gazeta de Lisboa, 8 de Dezembro de 1823 (n.º 290), pp. 1789 e 1790 - - Regional Level: - - [Azores] - https://files.dre.pt/1s/1980/08/19200/23052305.pdf - - [Madeira] - https://files.dre.pt/1s/1979/11/25900/28782878.pdf - https://files.dre.pt/1s/1989/02/02800/04360436.pdf - https://files.dre.pt/1s/2002/11/258a00/71837183.pdf - + - https://en.wikipedia.org/wiki/Public_holidays_in_Portugal + - `Labour Day `_ + - Portugal Day - Decreto 17.171 + - Restoration of Independence Day - Gazeta de Lisboa, 8 de Dezembro + de 1823 (n.º 290), pp. 1789 e 1790 + - Azores + - https://files.dre.pt/1s/1980/08/19200/23052305.pdf + - Madeira + - https://files.dre.pt/1s/1979/11/25900/28782878.pdf + - https://files.dre.pt/1s/1989/02/02800/04360436.pdf + - https://files.dre.pt/1s/2002/11/258a00/71837183.pdf """ country = "PT" diff --git a/holidays/countries/saudi_arabia.py b/holidays/countries/saudi_arabia.py index 6a5c0d4fb..b187dc702 100644 --- a/holidays/countries/saudi_arabia.py +++ b/holidays/countries/saudi_arabia.py @@ -30,16 +30,17 @@ class SaudiArabia(ObservedHolidayBase, IslamicHolidays, StaticHolidays): """ There are only 4 official national holidays in Saudi: - https://laboreducation.hrsd.gov.sa/en/gallery/274 - https://laboreducation.hrsd.gov.sa/en/labor-education/322 - https://english.alarabiya.net/News/gulf/2022/01/27/Saudi-Arabia-to-commemorate-Founding-Day-on-Feb-22-annually-Royal-order + - https://laboreducation.hrsd.gov.sa/en/gallery/274 + - https://laboreducation.hrsd.gov.sa/en/labor-education/322 + - https://english.alarabiya.net/News/gulf/2022/01/27/Saudi-Arabia-to-commemorate-Founding-Day-on-Feb-22-annually-Royal-order # noqa: E501 + The national day and the founding day holidays are based on the Georgian calendar while the other two holidays are based on the Islamic Calendar, and they are estimates as they announced each - year and based on moon sightings; - they are: - - Eid al-Fitr - - Eid al-Adha + year and based on moon sightings; they are: + - Eid al-Fitr + - Eid al-Adha + """ country = "SA" diff --git a/holidays/countries/south_korea.py b/holidays/countries/south_korea.py index 53a54f1ae..2034f516e 100644 --- a/holidays/countries/south_korea.py +++ b/holidays/countries/south_korea.py @@ -50,28 +50,36 @@ class SouthKorea( ): """ References: - 1. https://en.wikipedia.org/wiki/Public_holidays_in_South_Korea - 2. https://www.law.go.kr/법령/관공서의%20공휴일에%20관한%20규정 - 3. https://elaw.klri.re.kr/eng_service/lawView.do?lang=ENG&hseq=34678 - 4. https://elaw.klri.re.kr/eng_service/%20lawView.do?hseq=38405&lang=ENG - 5. https://namu.wiki/w/대통령%20선거일 - 6. https://namu.wiki/w/공휴일/대한민국 - 7. https://namu.wiki/w/공휴일/대한민국/역사 - 8. https://namu.wiki/w/대체%20휴일%20제도 - 9. https://overseas.mofa.go.kr/th-th/wpge/m_3133/contents.do (th localization) - 10. https://thailand.korean-culture.org/th/138/korea/38 (th localization) + - https://en.wikipedia.org/wiki/Public_holidays_in_South_Korea + - https://www.law.go.kr/법령/관공서의%20공휴일에%20관한%20규정 + - https://elaw.klri.re.kr/eng_service/lawView.do?lang=ENG&hseq=34678 + - https://elaw.klri.re.kr/eng_service/%20lawView.do?hseq=38405&lang=ENG + - https://namu.wiki/w/대통령%20선거일 + - https://namu.wiki/w/공휴일/대한민국 + - https://namu.wiki/w/공휴일/대한민국/역사 + - https://namu.wiki/w/대체%20휴일%20제도 + - `TH localization 1 `_ + - `TH localization 2 `_ Checked With: - 1. https://publicholidays.co.kr/ko/2020-dates/ - 2. https://publicholidays.co.kr/ko/2022-dates/ + - https://publicholidays.co.kr/ko/2020-dates/ + - https://publicholidays.co.kr/ko/2022-dates/ According to (3), the alt holidays in Korea are as follows: - - The alt holiday means next first non holiday after the holiday. - - Independence Movement Day, Liberation Day, National Foundation Day, - Hangul Day, Children's Day, Birthday of the Buddha, Christmas Day have - alt holiday if they fell on Saturday or Sunday. - - Korean New Year's Day, Korean Mid Autumn Day have alt holiday if they - fell on Sunday. + - The alt holiday means next first non holiday after the holiday. + - Independence Movement Day, Liberation Day, National Foundation Day, + Hangul Day, Children's Day, Birthday of the Buddha, Christmas Day have + alt holiday if they fell on Saturday or Sunday. + - Korean New Year's Day, Korean Mid Autumn Day have alt holiday if they + fell on Sunday. + + The alt holidays in Korea are as follows: + - The alt holiday means next first non holiday after the holiday. + - Independence Movement Day, Liberation Day, National Foundation Day, + Hangul Day, Children's Day, Birthday of the Buddha, Christmas Day have + alt holiday if they fell on Saturday or Sunday. + - Lunar New Year's Day, Korean Mid Autumn Day have alt holiday if they + fell on Sunday. """ @@ -342,14 +350,14 @@ class SouthKoreaLunisolarHolidays(_CustomChineseHolidays): class SouthKoreaStaticHolidays: """ References: - 1. https://namu.wiki/w/임시공휴일 * - 2. https://namu.wiki/w/공휴일/대한민국 ** - 3. https://namu.wiki/w/대체%20휴일%20제도 - - * Election Dates featured here are the ones prior to the proper recodification to - Article 34 of the Public Official Election Act(September 2006) - ** Sabang Day (사방의 날) was technically in the Public Holidays Act itself, but since it was - only celebrated in 1960, this is being put here. + - https://namu.wiki/w/임시공휴일 * + - https://namu.wiki/w/공휴일/대한민국 ** + - https://namu.wiki/w/대체%20휴일%20제도 + + (1) Election Dates featured here are the ones prior to the proper recodification to + Article 34 of the Public Official Election Act(September 2006) + (2) Sabang Day (사방의 날) was technically in the Public Holidays Act itself, but since it was + only celebrated in 1960, this is being put here. """ # Common Special Holiday Types. diff --git a/holidays/countries/sweden.py b/holidays/countries/sweden.py index e1d98f905..5e010f823 100644 --- a/holidays/countries/sweden.py +++ b/holidays/countries/sweden.py @@ -26,9 +26,10 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays): (https://sv.wikipedia.org/wiki/Helgdagar_i_Sverige). Initialize this class with include_sundays=False to not include sundays as a holiday. + Primary sources: - https://sv.wikipedia.org/wiki/Helgdagar_i_Sverige and - http://www.riksdagen.se/sv/dokument-lagar/dokument/svensk-forfattningssamling/lag-1989253-om-allmanna-helgdagar_sfs-1989-253 + - https://sv.wikipedia.org/wiki/Helgdagar_i_Sverige + - http://www.riksdagen.se/sv/dokument-lagar/dokument/svensk-forfattningssamling/lag-1989253-om-allmanna-helgdagar_sfs-1989-253 # noqa: E501 """ country = "SE" @@ -37,9 +38,8 @@ class Sweden(HolidayBase, ChristianHolidays, InternationalHolidays): def __init__(self, include_sundays=True, *args, **kwargs): """ - :param include_sundays: Whether to consider sundays as a holiday - (which they are in Sweden) - :param kwargs: + :param include_sundays: + Whether to consider sundays as a holiday (which they are in Sweden) """ self.include_sundays = include_sundays ChristianHolidays.__init__(self) diff --git a/holidays/countries/thailand.py b/holidays/countries/thailand.py index b146adc6c..3508d88ba 100644 --- a/holidays/countries/thailand.py +++ b/holidays/countries/thailand.py @@ -31,104 +31,101 @@ class Thailand(ObservedHolidayBase, InternationalHolidays, StaticHolidays, ThaiC A subclass of :py:class:`HolidayBase` representing public holidays in Thailand. References: - - - Based on: https://en.wikipedia.org/wiki/Public_holidays_in_Thailand - - Checked with: (Bank of Thailand 's wbm) http://tiny.cc/wa_bot_2023 - - [In Lieus] - (isranews.org 's wbm) http://tiny.cc/wa_isranews_inlieu_hist - https://resolution.soc.go.th/?prep_id=99159317 - https://resolution.soc.go.th/?prep_id=196007 - https://github.com/dr-prodigy/python-holidays/pull/929 - - [New Year's Day] - (wikisource.org 's wbm) http://tiny.cc/wa_wiki_thai_newyear_2483 - - [National Children's Day] - https://thainews.prd.go.th/banner/th/children'sday/ - - [Chakri Memorial Day] - (ocac.got.th 's wbm) http://tiny.cc/wa_ocac_chakri - - [Songkran Festival] - (museumsiam.org 's wbm) http://tiny.cc/wa_museumsiam_songkran - https://resolution.soc.go.th/?prep_id=123659 - - [National Labour Day] - https://www.thairath.co.th/lifestyle/culture/1832869 - - [National Day (24 June: Defunct)] - (Ministry of Culture 's wbm) http://tiny.cc/wa_mincul_nat_day - - [Coronation Day] - https://www.matichon.co.th/politics/news_526200 - https://workpointtoday.com/news1-5/ - - [HM Queen Suthida's Birthday] - https://www.thairath.co.th/news/politic/1567418 - - [HM Maha Vajiralongkorn's Birthday] - https://www.matichon.co.th/politics/news_526200 - - [HM Queen Sirikit the Queen Mother's Birthday] - https://hilight.kapook.com/view/14164 - - [National Mother's Day] - https://www.brh.go.th/index.php/2019-02-27-04-11-52/542-12-2564 - - [HM King Bhumibol Adulyadej Memorial Day] - https://www.matichon.co.th/politics/news_526200 - - [HM King Chulalongkorn Memorial Day] - https://th.wikipedia.org/wiki/วันปิยมหาราช - - [HM King Bhumibol Adulyadej's Birthday] - (Ministry of Culture 's wbm) http://tiny.cc/wa_mincul_nat_day - https://hilight.kapook.com/view/148862 - - [National Father's Day] - https://www.brh.go.th/index.php/2019-02-27-04-12-21/594-5-5 - - [Constitution Day] - https://hilight.kapook.com/view/18208 - (Bank of Thailand 's wbm) http://tiny.cc/wa_bot_1992 - https://www.myhora.com/ปฏิทิน/ปฏิทิน-พ.ศ.2475.aspx - - [New Year's Eve] - (Bank of Thailand 's wbm) http://tiny.cc/wa_bot_1992 - https://resolution.soc.go.th/?prep_id=205799 - https://resolution.soc.go.th/?prep_id=210744 - - [Makha Bucha] - https://www.onab.go.th/th/content/category/detail/id/73/iid/3403 - - [Visakha Bucha] - https://www.onab.go.th/th/content/category/detail/id/73/iid/3401 - - [Asarnha Bucha] - https://www.onab.go.th/th/content/category/detail/id/73/iid/3397 - - [Buddhist Lent Day] - https://www.onab.go.th/th/content/category/detail/id/73/iid/3395 - - [Royal Ploughing Ceremony] - https://en.wikipedia.org/wiki/Royal_Ploughing_Ceremony - https://www.lib.ru.ac.th/journal/may/may_phauchmongkol.html - https://www.myhora.com/ปฏิทิน/ปฏิทิน-พ.ศ.2540.aspx - - [Royal Thai Armed Forces Day] - https://th.wikipedia.org/wiki/วันกองทัพไทย - - [Teacher's Day] - https://www.cabinet.soc.go.th/doc_image/2500/718941.pdf - - !!! If Public Holiday falls on weekends, (in lieu) on workday !!! - Despite the wording, this usually only applies to Monday only for - holidays, consecutive holidays all have their own special in lieu - declared separately. - Data from 1992-1994 and 1998-2000 are declared discretely in - special_holidays declarations above. - Applied Automatically for Monday if on Weekends: 1961-1973 - **NOTE: No New Year's Eve (in lieu) for this period - No In Lieu days available: 1974-1988 - Case-by-Case application for Workday if on Weekends: 1989-1994 - Applied Automatically for Workday if on Weekends: 1995-1997 - Case-by-Case application for Workday if on Weekends: 1998-2000 - Applied Automatically for Workday if on Weekends: 2001-Present + - Based on: https://en.wikipedia.org/wiki/Public_holidays_in_Thailand + - Checked with: `Bank of Thailand lists `_ + - [In Lieus] + - `isranews.org `_ + - https://resolution.soc.go.th/?prep_id=99159317 + - https://resolution.soc.go.th/?prep_id=196007 + - https://github.com/dr-prodigy/python-holidays/pull/929 + - [New Year's Day] + `wikisource.org `_ + - [National Children's Day] + https://thainews.prd.go.th/banner/th/children'sday/ + - [Chakri Memorial Day] + `ocac.got.th `_ + - [Songkran Festival] + - `museumsiam.org `_ + - https://resolution.soc.go.th/?prep_id=123659 + - [National Labour Day] + https://www.thairath.co.th/lifestyle/culture/1832869 + - [National Day (24 June: Defunct)] + `Ministry of Culture `_ + - [Coronation Day] + https://www.matichon.co.th/politics/news_526200 + https://workpointtoday.com/news1-5/ + - [HM Queen Suthida's Birthday] + https://www.thairath.co.th/news/politic/1567418 + - [HM Maha Vajiralongkorn's Birthday] + https://www.matichon.co.th/politics/news_526200 + - [HM Queen Sirikit the Queen Mother's Birthday] + https://hilight.kapook.com/view/14164 + - [National Mother's Day] + https://www.brh.go.th/index.php/2019-02-27-04-11-52/542-12-2564 + - [HM King Bhumibol Adulyadej Memorial Day] + https://www.matichon.co.th/politics/news_526200 + - [HM King Chulalongkorn Memorial Day] + ``_ + - [HM King Bhumibol Adulyadej's Birthday] + - `Ministry of Culture `_ + - https://hilight.kapook.com/view/148862 + - [National Father's Day] + https://www.brh.go.th/index.php/2019-02-27-04-12-21/594-5-5 + - [Constitution Day] + - https://hilight.kapook.com/view/18208 + - `Bank of Thailand `_ + - ``_ + - [New Year's Eve] + - `Bank of Thailand`_ + - https://resolution.soc.go.th/?prep_id=205799 + - https://resolution.soc.go.th/?prep_id=210744 + - [Makha Bucha] + https://www.onab.go.th/th/content/category/detail/id/73/iid/3403 + - [Visakha Bucha] + https://www.onab.go.th/th/content/category/detail/id/73/iid/3401 + - [Asarnha Bucha] + https://www.onab.go.th/th/content/category/detail/id/73/iid/3397 + - [Buddhist Lent Day] + https://www.onab.go.th/th/content/category/detail/id/73/iid/3395 + - [Royal Ploughing Ceremony] + https://en.wikipedia.org/wiki/Royal_Ploughing_Ceremony + https://www.lib.ru.ac.th/journal/may/may_phauchmongkol.html + ``_ + - [Royal Thai Armed Forces Day] + ``_ + - [Teacher's Day] + https://www.cabinet.soc.go.th/doc_image/2500/718941.pdf + + !!! If Public Holiday falls on weekends, (in lieu) on workday !!! + Despite the wording, this usually only applies to Monday only for + holidays, consecutive holidays all have their own special in lieu + declared separately. + Data from 1992-1994 and 1998-2000 are declared discretely in + special_holidays declarations above. + Applied Automatically for Monday if on Weekends: 1961-1973 + **NOTE**: No New Year's Eve (in lieu) for this period + No In Lieu days available: 1974-1988 + Case-by-Case application for Workday if on Weekends: 1989-1994 + Applied Automatically for Workday if on Weekends: 1995-1997 + Case-by-Case application for Workday if on Weekends: 1998-2000 + Applied Automatically for Workday if on Weekends: 2001-Present Limitations: + - This is only 100% accurate for 1997-2023; any future dates are up to the + Royal Thai Government Gazette which updates on a year-by-year basis. - - This is only 100% accurate for 1997-2023; any future dates are up to the - Royal Thai Government Gazette which updates on a year-by-year basis. - - - Approx. date only goes as far back as 1941 (B.E. 2484) as the Thai - calendar for B.E. 2483 as we only have nine months from switching - New Year Date (April 1st to January 1st). - - - Thai Lunar Calendar Holidays only work from 1941 (B.E. 2484) onwards - until 2057 (B.E. 2600) as we only have Thai year-type data for - cross-checking until then. + - Approx. date only goes as far back as 1941 (B.E. 2484) as the Thai + calendar for B.E. 2483 as we only have nine months from switching + New Year Date (April 1st to January 1st). - - Royal Ploughing Ceremony Day is date is announced on an annual basis - by the Court Astrologers, thus need an annual update to the library here + - Thai Lunar Calendar Holidays only work from 1941 (B.E. 2484) onwards + until 2057 (B.E. 2600) as we only have Thai year-type data for + cross-checking until then. - - This doesn't cover Thai regional public holidays yet, only stubs added + - Royal Ploughing Ceremony Day is date is announced on an annual basis + by the Court Astrologers, thus need an annual update to the library here + - This doesn't cover Thai regional public holidays yet, only stubs added Country created by: `arkid15r `__ diff --git a/holidays/countries/ukraine.py b/holidays/countries/ukraine.py index 02df68c44..70473727d 100644 --- a/holidays/countries/ukraine.py +++ b/holidays/countries/ukraine.py @@ -34,56 +34,10 @@ class Ukraine(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays): """ - Current holidays list: - https://zakon1.rada.gov.ua/laws/show/322-08/paran454#n454 - - Substituted holidays: - 1992 - https://zakon.rada.gov.ua/laws/show/202-92-%D0%BF, - https://zakon.rada.gov.ua/laws/show/377-91-%D0%BF - 1993 - https://zakon.rada.gov.ua/laws/show/563-93-%D0%BF, - https://zakon.rada.gov.ua/laws/show/725-92-%D0%BF - 1994 - https://zakon.rada.gov.ua/laws/show/98-94-%D0%BF - 1995 - https://zakon.rada.gov.ua/laws/show/852-95-%D0%BF, - https://zakon.rada.gov.ua/laws/show/634-95-%D0%BF, - https://zakon.rada.gov.ua/laws/show/266-95-%D0%BF - 1996 - https://zakon.rada.gov.ua/laws/show/424-96-%D0%BF - 1997 - https://zakon.rada.gov.ua/laws/show/326-97-%D0%BF, - https://zakon.rada.gov.ua/laws/show/1547-96-%D0%BF - 1999 - https://zakon.rada.gov.ua/laws/show/1433-99-%D0%BF, - https://zakon.rada.gov.ua/laws/show/558-99-%D0%BF, - https://zakon.rada.gov.ua/laws/show/2070-98-%D0%BF - 2000 - https://zakon.rada.gov.ua/laws/show/1251-2000-%D0%BF, - https://zakon.rada.gov.ua/laws/show/717-2000-%D0%BF - 2001 - https://zakon.rada.gov.ua/laws/show/138-2001-%D1%80, - https://zakon.rada.gov.ua/laws/show/210-2001-%D0%BF - 2002, - 2003 - https://zakon.rada.gov.ua/laws/show/202-2002-%D1%80, - https://zakon.rada.gov.ua/laws/show/705-2002-%D1%80 - 2004 - https://zakon.rada.gov.ua/laws/show/773-2003-%D1%80 - 2005 - https://zakon.rada.gov.ua/laws/show/936-2004-%D1%80, - https://zakon.rada.gov.ua/laws/show/133-2005-%D1%80 - 2006 - https://zakon.rada.gov.ua/laws/show/490-2005-%D1%80, - https://zakon.rada.gov.ua/laws/show/562-2005-%D1%80 - 2007 - https://zakon.rada.gov.ua/laws/show/612-2006-%D1%80 - 2008 - https://zakon.rada.gov.ua/laws/show/1059-2007-%D1%80, - https://zakon.rada.gov.ua/laws/show/538-2008-%D1%80 - 2009 - https://zakon.rada.gov.ua/laws/show/1458-2008-%D1%80 - 2010 - https://zakon.rada.gov.ua/laws/show/1412-2009-%D1%80 - 2011 - https://zakon.rada.gov.ua/laws/show/2130-2010-%D1%80 - 2012 - https://zakon.rada.gov.ua/laws/show/1210-2011-%D1%80 - 2013 - https://zakon.rada.gov.ua/laws/show/1043-2012-%D1%80 - 2014 - https://zakon.rada.gov.ua/laws/show/920-2013-%D1%80 - 2015 - https://zakon.rada.gov.ua/laws/show/1084-2014-%D1%80 - 2016 - https://zakon.rada.gov.ua/laws/show/1155-2015-%D1%80 - 2017 - https://zakon.rada.gov.ua/laws/show/850-2016-%D1%80 - 2018 - https://zakon.rada.gov.ua/laws/show/1-2018-%D1%80 - 2019 - https://zakon.rada.gov.ua/laws/show/7-2019-%D1%80 - 2020 - https://zakon.rada.gov.ua/laws/show/995-2019-%D1%80 - 2021 - https://zakon.rada.gov.ua/laws/show/1191-2020-%D1%80 - 2022 - https://zakon.rada.gov.ua/laws/show/1004-2021-%D1%80 + Ukraine holidays. - Special holidays: - 1995 - https://zakon.rada.gov.ua/laws/show/13/95 + Current holidays list: + - https://zakon1.rada.gov.ua/laws/show/322-08/paran454#n454 """ country = "UA" @@ -212,6 +166,55 @@ class UKR(Ukraine): class UkraineStaticHolidays: + """ + Substituted holidays: + - `1992 [1] `_ + - `1992 [2] `_ + - `1993 [1] `_ + - `1993 [2] `_ + - `1994 `_ + - `1995 [1] `_ + - `1995 [2] `_ + - `1995 [3] `_ + - `1996 `_ + - `1997[1] `_ + - `1997[2] `_ + - `1999 [1] `_, + - `1999 [2] `_, + - `1999 [3] `_ + - `2000 [1] `_ + - `2000 [2] `_ + - `2001 [1] `_ + - `2001 [2] `_ + - `2002 `_ + - `2002 - 2003 `_ + - `2004 `_ + - `2005 [1] `_ + - `2005 [2] `_ + - `2006 [1] `_ + - `2006 [2] `_ + - `2007 `_ + - `2008 [1] `_ + - `2008 [2] `_ + - `2009 `_ + - `2010 `_ + - `2011 `_ + - `2012 `_ + - `2013 `_ + - `2014 `_ + - `2015 `_ + - `2016 `_ + - `2017 `_ + - `2018 `_ + - `2019 `_ + - `2020 `_ + - `2021 `_ + - `2022 `_ + + Special holidays: + - `1995 `_ + """ + special_holidays = { # Presidential decree holiday. 1995: (JAN, 9, tr("Вихідний згідно указу Президента")) diff --git a/holidays/groups/buddhist.py b/holidays/groups/buddhist.py index 43685a19d..cb8ba220a 100644 --- a/holidays/groups/buddhist.py +++ b/holidays/groups/buddhist.py @@ -10,7 +10,7 @@ # License: MIT (see LICENSE file) from datetime import date -from typing import Tuple, Optional +from typing import Optional, Tuple from holidays.calendars import _BuddhistLunisolar diff --git a/holidays/groups/chinese.py b/holidays/groups/chinese.py index 816766f50..870d0884f 100644 --- a/holidays/groups/chinese.py +++ b/holidays/groups/chinese.py @@ -11,7 +11,7 @@ from datetime import date from datetime import timedelta as td -from typing import Tuple, Optional +from typing import Optional, Tuple from holidays.calendars import _ChineseLunisolar from holidays.calendars.gregorian import APR diff --git a/holidays/groups/hindu.py b/holidays/groups/hindu.py index 3a2a63ad9..a947a600f 100644 --- a/holidays/groups/hindu.py +++ b/holidays/groups/hindu.py @@ -10,7 +10,7 @@ # License: MIT (see LICENSE file) from datetime import date -from typing import Tuple, Optional +from typing import Optional, Tuple from holidays.calendars import _HinduLunisolar diff --git a/holidays/groups/thai.py b/holidays/groups/thai.py index 4f2643314..81de998cc 100644 --- a/holidays/groups/thai.py +++ b/holidays/groups/thai.py @@ -12,7 +12,7 @@ from datetime import date from typing import Optional -from holidays.calendars.thai import _ThaiLunisolar, THAI_CALENDAR +from holidays.calendars.thai import THAI_CALENDAR, _ThaiLunisolar class ThaiCalendarHolidays: diff --git a/pyproject.toml b/pyproject.toml index b283c9c19..769fdbb78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ module = "holidays.groups.*" disable_error_code = "attr-defined" [tool.rstcheck] -ignore_directives = ["automodule"] +ignore_directives = ["automodule", "autosummary"] ignore_languages = ["python"] [tool.setuptools.dynamic] diff --git a/requirements/docs.txt b/requirements/docs.txt index 01a7d8e49..f6342e766 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,5 +1,5 @@ # pip requirements for building docs. # Must include package `install_requires` entries. python-dateutil -sphinx >= 4.3 -sphinx_rtd_theme >= 1.0 +sphinx +sphinx_rtd_theme