-
-
Notifications
You must be signed in to change notification settings - Fork 544
Update United States holidays: add th
l10n
#2678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Caution Review failedFailed to post review comments. Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughThis update introduces localization support for United States and related territories' holidays, adding English and Thai translations. It modifies holiday classes to support internationalization, adds translation resource files, updates documentation to reflect supported languages, and expands tests to verify localized holiday names for both default and Thai locales. Changes
Possibly related PRs
Suggested reviewers
✨ Finishing Touches
🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2678 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 251 251
Lines 15272 15305 +33
Branches 2092 2095 +3
=========================================
+ Hits 15272 15305 +33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 16
🔭 Outside diff range comments (2)
holidays/locale/th/LC_MESSAGES/GU.po (1)
15-29
: Translation set is empty.Same concern as above – Guam-specific holidays will render in English.
Please populate the file or defer committing it until translations are provided.holidays/locale/th/LC_MESSAGES/VI.po (1)
15-29
: Empty Thai PO – translations still missing.Ensure at least the territory-specific holiday names for the U.S. Virgin Islands are translated; otherwise the Thai locale adds no value.
♻️ Duplicate comments (3)
holidays/locale/th/LC_MESSAGES/PR.po (1)
17-28
: Same missingPlural-Forms
headerReplicate the Thai rule here as well.
"Language: th\n" +"Plural-Forms: nplurals=1; plural=0;\n"
holidays/locale/th/LC_MESSAGES/UM.po (1)
17-28
: AddPlural-Forms
to complete header"Language: th\n" +"Plural-Forms: nplurals=1; plural=0;\n"
holidays/locale/en_US/LC_MESSAGES/AS.po (1)
17-28
: MissingPlural-Forms
header (English)"Language: en_US\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (29)
README.md
(6 hunks)holidays/countries/american_samoa.py
(1 hunks)holidays/countries/guam.py
(1 hunks)holidays/countries/northern_mariana_islands.py
(1 hunks)holidays/countries/puerto_rico.py
(1 hunks)holidays/countries/united_states.py
(10 hunks)holidays/countries/united_states_minor_outlying_islands.py
(1 hunks)holidays/countries/united_states_virgin_islands.py
(1 hunks)holidays/locale/en_US/LC_MESSAGES/AS.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/GU.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/MP.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/PR.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/UM.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/US.po
(1 hunks)holidays/locale/en_US/LC_MESSAGES/VI.po
(1 hunks)holidays/locale/th/LC_MESSAGES/AS.po
(1 hunks)holidays/locale/th/LC_MESSAGES/GU.po
(1 hunks)holidays/locale/th/LC_MESSAGES/MP.po
(1 hunks)holidays/locale/th/LC_MESSAGES/PR.po
(1 hunks)holidays/locale/th/LC_MESSAGES/UM.po
(1 hunks)holidays/locale/th/LC_MESSAGES/US.po
(1 hunks)holidays/locale/th/LC_MESSAGES/VI.po
(1 hunks)tests/countries/test_american_samoa.py
(1 hunks)tests/countries/test_guam.py
(1 hunks)tests/countries/test_northern_mariana_islands.py
(1 hunks)tests/countries/test_puerto_rico.py
(1 hunks)tests/countries/test_united_states.py
(1 hunks)tests/countries/test_united_states_minor_outlying_islands.py
(1 hunks)tests/countries/test_united_states_virgin_islands.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
holidays/locale/en_US/LC_MESSAGES/MP.po (2)
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:12-12
Timestamp: 2025-04-06T14:44:59.785Z
Learning: Use standardized .po file headers for localization files in the holidays project:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Other languages format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
🪛 Pylint (3.3.7)
tests/countries/test_guam.py
[convention] 51-51: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 84-84: Missing function or method docstring
(C0116)
tests/countries/test_puerto_rico.py
[convention] 51-51: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 84-84: Missing function or method docstring
(C0116)
tests/countries/test_united_states_virgin_islands.py
[convention] 51-51: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 86-86: Missing function or method docstring
(C0116)
tests/countries/test_northern_mariana_islands.py
[convention] 51-51: Missing function or method docstring
(C0116)
[convention] 59-59: Missing function or method docstring
(C0116)
[convention] 84-84: Missing function or method docstring
(C0116)
tests/countries/test_united_states.py
[convention] 2086-2086: Missing function or method docstring
(C0116)
[convention] 2194-2194: Missing function or method docstring
(C0116)
tests/countries/test_united_states_minor_outlying_islands.py
[convention] 47-47: Missing function or method docstring
(C0116)
[convention] 55-55: Missing function or method docstring
(C0116)
[convention] 75-75: Missing function or method docstring
(C0116)
tests/countries/test_american_samoa.py
[convention] 50-50: Missing function or method docstring
(C0116)
[convention] 58-58: Missing function or method docstring
(C0116)
[convention] 83-83: Missing function or method docstring
(C0116)
holidays/countries/united_states.py
[convention] 398-398: Line too long (149/100)
(C0301)
⏰ Context from checks skipped due to timeout of 300000ms (3)
- GitHub Check: Test Python 3.11 on windows-latest
- GitHub Check: Test Python 3.13 on windows-latest
- GitHub Check: Test Python 3.10 on windows-latest
🔇 Additional comments (27)
holidays/locale/en_US/LC_MESSAGES/MP.po (1)
13-14
: Header comment follows house style – no action needed.The country-name comment line matches the documented pattern for default-language PO files.
holidays/locale/en_US/LC_MESSAGES/VI.po (1)
13-14
: Consistent header – looks good.The header comment respects the repository’s naming convention.
holidays/locale/th/LC_MESSAGES/MP.po (1)
15-29
: Let’s verify whetherMP.po
contains any non-headermsgid
entries:#!/bin/bash grep -n '^msgid ' holidays/locale/th/LC_MESSAGES/MP.poREADME.md (1)
181-181
: Documentation updates look solid.The supported languages column consistently shows "en_US, th" for all US territories, properly documenting the new Thai localization support. The formatting maintains the existing pattern with the default language bolded.
Also applies to: 671-671, 1091-1091, 1182-1182, 1497-1497, 1504-1504, 1560-1560
holidays/locale/en_US/LC_MESSAGES/UM.po (1)
1-29
: Translation template structure is correct.Standard PO file headers are properly formatted with appropriate metadata including project version, creation dates, and encoding details. Ready for translation entries to be added.
holidays/countries/puerto_rico.py (1)
14-14
: Localization refactoring implemented correctly.The import update, inheritance change to
UnitedStates
, and addition ofparent_entity
attribute properly align with the localization framework changes. This follows the expected pattern for enabling translation support.Also applies to: 17-17, 25-25
holidays/locale/en_US/LC_MESSAGES/PR.po (1)
1-29
: Translation template follows proper standards.PO file headers are correctly structured with all required metadata. The template is ready for translation entries to be populated as needed.
holidays/countries/northern_mariana_islands.py (1)
14-14
: Consistent localization updates applied.The changes mirror the pattern used in other territory files - proper import update, inheritance from
UnitedStates
, andparent_entity
addition. This maintains consistency across the localization refactoring effort.Also applies to: 17-17, 25-25
holidays/countries/american_samoa.py (1)
14-14
: Clean import and inheritance updates for localization support.The changes properly update the import and class inheritance to use
UnitedStates
instead ofUS
, and add theparent_entity
attribute to support the new localization architecture.Also applies to: 17-17, 25-25
holidays/countries/united_states_virgin_islands.py (1)
14-14
: Consistent localization architecture implementation.The changes mirror the pattern used in other territory modules, maintaining architectural consistency for the internationalization support.
Also applies to: 17-17, 25-25
holidays/countries/guam.py (1)
14-14
: Proper implementation of localization architecture.These changes maintain the consistent pattern across all US territory modules, ensuring uniform support for internationalization.
Also applies to: 17-17, 25-25
holidays/countries/united_states_minor_outlying_islands.py (1)
14-14
: Excellent consistency across territory modules.The implementation maintains perfect consistency with the other US territory modules, demonstrating solid architectural discipline for the localization feature.
Also applies to: 17-17, 25-25
tests/countries/test_guam.py (1)
51-57
: Method repositioning looks good.The
test_unofficial_holidays
method repositioning maintains logical test organization without affecting functionality.tests/countries/test_united_states_virgin_islands.py (1)
51-57
: Good organizational improvement.Moving this method to follow
test_government_holidays
improves the logical flow of the test suite.tests/countries/test_puerto_rico.py (1)
51-57
: Good test organization.Moving this method improves the logical grouping of test methods.
tests/countries/test_united_states_minor_outlying_islands.py (1)
47-53
: Good test organization.Moving this method after
test_government_holidays
improves test structure.tests/countries/test_american_samoa.py (1)
50-56
: Good test organization.Moving this method improves the logical flow of test methods.
tests/countries/test_northern_mariana_islands.py (3)
51-58
: LGTM! Test method repositioning looks clean.The repositioning of
test_unofficial_holidays
maintains logical test organization.
59-83
: Excellent localization test coverage for default language.Comprehensive test verifying English holiday names across all categories including observed holidays.
84-108
: Solid Thai localization test implementation.Well-structured test ensuring Thai translations are working correctly. The Thai translations appear accurate and consistent.
holidays/locale/en_US/LC_MESSAGES/US.po (1)
1-430
: Perfect gettext template structure for English locale.This .po file correctly serves as the English localization template with proper headers and comprehensive message coverage for all US holidays. Empty
msgstr
entries are appropriate since source strings are already in English.holidays/locale/th/LC_MESSAGES/US.po (1)
1-430
: Comprehensive Thai localization with excellent coverage.Complete Thai translations for all US holidays with proper gettext formatting. The translations appear well-crafted and maintain consistency throughout the file.
holidays/countries/united_states.py (5)
13-13
: Good addition of gettext import for internationalization.Clean import statement following standard gettext patterns.
88-91
: Excellent i18n configuration setup.Proper configuration of localization attributes with default language and supported languages clearly defined.
233-294
: Comprehensive translation wrapping in common holidays.All holiday name strings properly wrapped with
tr()
function and descriptive comments added. The implementation is consistent and thorough.
302-311
: Smart implementation of Christmas Eve holiday logic.Good use of translation function with proper observed rule handling.
1266-1307
: Well-organized unofficial holidays with proper translation.Clean implementation of cultural holidays with appropriate historical context and translation wrapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (68)
holidays/countries/united_states.py
(11 hunks)holidays/locale/en_US/LC_MESSAGES/US.po
(1 hunks)holidays/locale/th/LC_MESSAGES/US.po
(1 hunks)snapshots/countries/AS_COMMON.json
(0 hunks)snapshots/countries/GU_COMMON.json
(0 hunks)snapshots/countries/MP_COMMON.json
(1 hunks)snapshots/countries/PR_COMMON.json
(0 hunks)snapshots/countries/UM_COMMON.json
(0 hunks)snapshots/countries/US_AK.json
(0 hunks)snapshots/countries/US_AL.json
(0 hunks)snapshots/countries/US_AR.json
(0 hunks)snapshots/countries/US_AS.json
(0 hunks)snapshots/countries/US_AZ.json
(0 hunks)snapshots/countries/US_CA.json
(0 hunks)snapshots/countries/US_CO.json
(0 hunks)snapshots/countries/US_COMMON.json
(0 hunks)snapshots/countries/US_CT.json
(0 hunks)snapshots/countries/US_DC.json
(0 hunks)snapshots/countries/US_DE.json
(0 hunks)snapshots/countries/US_FL.json
(0 hunks)snapshots/countries/US_GA.json
(0 hunks)snapshots/countries/US_GU.json
(0 hunks)snapshots/countries/US_HI.json
(0 hunks)snapshots/countries/US_IA.json
(0 hunks)snapshots/countries/US_ID.json
(0 hunks)snapshots/countries/US_IL.json
(0 hunks)snapshots/countries/US_IN.json
(0 hunks)snapshots/countries/US_KS.json
(0 hunks)snapshots/countries/US_KY.json
(0 hunks)snapshots/countries/US_LA.json
(4 hunks)snapshots/countries/US_MA.json
(0 hunks)snapshots/countries/US_MD.json
(0 hunks)snapshots/countries/US_ME.json
(0 hunks)snapshots/countries/US_MI.json
(0 hunks)snapshots/countries/US_MN.json
(0 hunks)snapshots/countries/US_MO.json
(0 hunks)snapshots/countries/US_MP.json
(1 hunks)snapshots/countries/US_MS.json
(0 hunks)snapshots/countries/US_MT.json
(0 hunks)snapshots/countries/US_NC.json
(0 hunks)snapshots/countries/US_ND.json
(0 hunks)snapshots/countries/US_NE.json
(0 hunks)snapshots/countries/US_NH.json
(0 hunks)snapshots/countries/US_NJ.json
(0 hunks)snapshots/countries/US_NM.json
(0 hunks)snapshots/countries/US_NV.json
(0 hunks)snapshots/countries/US_NY.json
(0 hunks)snapshots/countries/US_OH.json
(0 hunks)snapshots/countries/US_OK.json
(0 hunks)snapshots/countries/US_OR.json
(0 hunks)snapshots/countries/US_PA.json
(0 hunks)snapshots/countries/US_PR.json
(0 hunks)snapshots/countries/US_RI.json
(0 hunks)snapshots/countries/US_SC.json
(0 hunks)snapshots/countries/US_SD.json
(0 hunks)snapshots/countries/US_TN.json
(0 hunks)snapshots/countries/US_TX.json
(0 hunks)snapshots/countries/US_UM.json
(0 hunks)snapshots/countries/US_UT.json
(0 hunks)snapshots/countries/US_VA.json
(0 hunks)snapshots/countries/US_VI.json
(7 hunks)snapshots/countries/US_VT.json
(0 hunks)snapshots/countries/US_WA.json
(0 hunks)snapshots/countries/US_WI.json
(0 hunks)snapshots/countries/US_WV.json
(0 hunks)snapshots/countries/US_WY.json
(0 hunks)snapshots/countries/VI_COMMON.json
(7 hunks)tests/countries/test_united_states.py
(73 hunks)
💤 Files with no reviewable changes (59)
- snapshots/countries/US_DE.json
- snapshots/countries/US_MO.json
- snapshots/countries/US_ID.json
- snapshots/countries/US_CT.json
- snapshots/countries/US_AZ.json
- snapshots/countries/US_IN.json
- snapshots/countries/US_AK.json
- snapshots/countries/US_GA.json
- snapshots/countries/GU_COMMON.json
- snapshots/countries/US_ND.json
- snapshots/countries/US_NY.json
- snapshots/countries/US_AR.json
- snapshots/countries/US_MN.json
- snapshots/countries/US_NE.json
- snapshots/countries/US_RI.json
- snapshots/countries/US_KS.json
- snapshots/countries/US_TN.json
- snapshots/countries/US_NJ.json
- snapshots/countries/US_WY.json
- snapshots/countries/US_AL.json
- snapshots/countries/US_PR.json
- snapshots/countries/US_CA.json
- snapshots/countries/US_SC.json
- snapshots/countries/US_GU.json
- snapshots/countries/US_WV.json
- snapshots/countries/US_HI.json
- snapshots/countries/US_MI.json
- snapshots/countries/US_KY.json
- snapshots/countries/US_PA.json
- snapshots/countries/US_VT.json
- snapshots/countries/US_WA.json
- snapshots/countries/US_TX.json
- snapshots/countries/UM_COMMON.json
- snapshots/countries/US_ME.json
- snapshots/countries/US_NM.json
- snapshots/countries/US_OR.json
- snapshots/countries/US_MD.json
- snapshots/countries/US_OH.json
- snapshots/countries/US_MT.json
- snapshots/countries/US_FL.json
- snapshots/countries/US_SD.json
- snapshots/countries/US_UT.json
- snapshots/countries/US_MS.json
- snapshots/countries/US_COMMON.json
- snapshots/countries/US_NH.json
- snapshots/countries/PR_COMMON.json
- snapshots/countries/US_WI.json
- snapshots/countries/US_VA.json
- snapshots/countries/US_MA.json
- snapshots/countries/US_NC.json
- snapshots/countries/AS_COMMON.json
- snapshots/countries/US_OK.json
- snapshots/countries/US_AS.json
- snapshots/countries/US_NV.json
- snapshots/countries/US_IL.json
- snapshots/countries/US_UM.json
- snapshots/countries/US_DC.json
- snapshots/countries/US_CO.json
- snapshots/countries/US_IA.json
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0
Timestamp: 2025-04-06T14:52:35.679Z
Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
Learnt from: KJhellico
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:75-76
Timestamp: 2025-04-05T09:44:39.998Z
Learning: In the holidays library, en_US locale is the standard for localization comments (using American English spelling like "Labor"), while the actual holiday names in code use the appropriate locale-specific spelling (like "Labour" for British English locales such as en_TT).
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76
Timestamp: 2025-06-10T05:08:07.939Z
Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:12-12
Timestamp: 2025-04-06T14:44:59.785Z
Learning: Use standardized .po file headers for localization files in the holidays project:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Other languages format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").
Learnt from: KJhellico
PR: vacanza/holidays#2524
File: holidays/countries/grenada.py:81-83
Timestamp: 2025-05-03T20:16:58.203Z
Learning: In the Vacanza holidays library, localization (l10n) comments are always written in American English (en_US locale), even when the translatable strings use different regional spellings. For example, comments use "Labor Day" while the corresponding translatable string might use "Labour Day".
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: holidays/locale/en_TL/LC_MESSAGES/TL.po:42-44
Timestamp: 2025-04-03T05:58:00.033Z
Learning: The en_TL (English for Timor-Leste) localization for holidays intentionally uses "World" instead of "International" (e.g., "World Labour Day") to maintain accuracy with official Timor-Leste government sources, even though code comments and other localizations like en_US use "International".
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: holidays/locale/en_TL/LC_MESSAGES/TL.po:42-44
Timestamp: 2025-04-03T05:58:00.033Z
Learning: The en_TL (English for Timor-Leste) localization for holidays intentionally uses "World" instead of "International" (e.g., "World Labour Day") to maintain accuracy with official Timor-Leste government sources, even though code comments and other localizations like en_US use "International".
Learnt from: PPsyrius
PR: vacanza/holidays#2362
File: holidays/ical.py:53-80
Timestamp: 2025-03-26T08:55:08.917Z
Learning: The holidays library intentionally limits language code support to ISO 639-1 and ISO 639-2 standards (2-3 letter language codes with optional region) to maintain consistency with other modules like `common_holidays` and `financial_holidays`, rather than implementing full RFC 5646 compliance.
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:25-25
Timestamp: 2025-04-02T04:54:07.204Z
Learning: For English-speaking countries in the holidays library (like Trinidad and Tobago), the `default_language` and `supported_languages` parameters are optional. If languages are added for such countries, ensure that `en_US` is included in the list alongside the regional code variant (e.g., `en_TT` for Trinidad and Tobago).
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
snapshots/countries/US_LA.json (16)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-182
Timestamp: 2025-06-18T10:12:57.419Z
Learning: In the France holidays implementation, subdivisions like "GES" and "Metropole" that covered multiple departments with different holiday rules are completely deprecated rather than aliased, because aliasing them to a subset (like Alsace-Moselle) would provide incomplete or incorrect holiday data for the other covered regions. Complete deprecation is preferred over partial/incorrect data coverage.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:300-319
Timestamp: 2025-06-18T10:21:01.376Z
Learning: In the France holidays implementation, legislative years for holiday changes should be hard-coded rather than extracted into constants, as this maintains consistency with the existing codebase pattern and provides historical accuracy for specific legislative acts.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-180
Timestamp: 2025-06-18T10:26:50.180Z
Learning: In the France holidays implementation, the _populate_subdiv_57_public_holidays() (Moselle) and _populate_subdiv_6ae_public_holidays() (Alsace) methods are functionally identical, both adding Good Friday (≥1893) and Saint Stephen's Day (≥1892) with the same legal references from August 16th, 1892. Therefore, for the deprecated "Alsace-Moselle" subdivision, calling either method produces the same result.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-182
Timestamp: 2025-06-18T10:18:59.447Z
Learning: In the France holidays implementation, deprecated subdivision names like "Alsace-Moselle" and "Saint-Barthélémy" are handled through explicit conditionals in _populate_public_holidays() that map them to their corresponding new subdivision-specific holiday population methods, providing backward compatibility while users transition to the new ISO codes.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: snapshots/countries/FR_6AE.json:690-706
Timestamp: 2025-06-18T10:33:29.809Z
Learning: During the French "journée de solidarité" experiment (2004-2007), Whit Monday was removed nationwide from 2005-2007, including in Alsace-Moselle subdivisions (FR_57, FR_6AE) that typically maintain additional regional holidays like Good Friday and Saint Stephen's Day.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: KJhellico
PR: vacanza/holidays#2297
File: holidays/countries/united_states.py:528-534
Timestamp: 2025-03-06T12:36:48.071Z
Learning: Georgia and Indiana commemorate Washington's Birthday on December 24, not in February like the federal holiday. This is why the code uses Christmas Day as a reference point with the GA_IN_WASHINGTON_BIRTHDAY rule.
holidays/locale/th/LC_MESSAGES/US.po (13)
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0
Timestamp: 2025-04-06T14:52:35.679Z
Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:12-12
Timestamp: 2025-04-06T14:44:59.785Z
Learning: Use standardized .po file headers for localization files in the holidays project:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Other languages format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.
Learnt from: KJhellico
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:75-76
Timestamp: 2025-04-05T09:44:39.998Z
Learning: In the holidays library, en_US locale is the standard for localization comments (using American English spelling like "Labor"), while the actual holiday names in code use the appropriate locale-specific spelling (like "Labour" for British English locales such as en_TT).
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/locale/sv_FI/LC_MESSAGES/AX.po:17-27
Timestamp: 2025-05-10T04:34:02.406Z
Learning: The `Plural-Forms` header isn't used in .po file generation for the holidays project and doesn't need to be manually added to localization files.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.
snapshots/countries/US_VI.json (20)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: PPsyrius
PR: vacanza/holidays#2349
File: snapshots/countries/TW_COMMON.json:9-12
Timestamp: 2025-03-13T07:50:10.598Z
Learning: JSON files in the `snapshots/` directory (like `snapshots/countries/TW_COMMON.json`) are automatically generated by the `make snapshot` command and not meant to be manually edited.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-182
Timestamp: 2025-06-18T10:12:57.419Z
Learning: In the France holidays implementation, subdivisions like "GES" and "Metropole" that covered multiple departments with different holiday rules are completely deprecated rather than aliased, because aliasing them to a subset (like Alsace-Moselle) would provide incomplete or incorrect holiday data for the other covered regions. Complete deprecation is preferred over partial/incorrect data coverage.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.
Learnt from: KJhellico
PR: vacanza/holidays#2297
File: holidays/countries/united_states.py:528-534
Timestamp: 2025-03-06T12:36:48.071Z
Learning: Georgia and Indiana commemorate Washington's Birthday on December 24, not in February like the federal holiday. This is why the code uses Christmas Day as a reference point with the GA_IN_WASHINGTON_BIRTHDAY rule.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:124-130
Timestamp: 2025-06-14T18:58:55.499Z
Learning: In Guyana's holidays implementation (holidays/countries/guyana.py), Emancipation Day should be implemented as a fixed-date holiday on August 1st with weekend observance rules, not as the first Monday of August. This is confirmed by official Guyana Ministry of Home Affairs sources.
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/countries/turks_and_caicos_islands.py:117-118
Timestamp: 2025-05-13T13:23:11.375Z
Learning: The holidays library uses `_add_christmas_day_two` method to add Boxing Day holiday, not `_add_boxing_day`.
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:52-64
Timestamp: 2025-06-15T10:15:39.883Z
Learning: In the Anguilla holidays implementation, March 2 only has "James Ronald Webster Day" (from 2010 onwards). There is no "Sovereignty Day" holiday on this date. Queen's/King's Birthday holidays are in June, not March.
snapshots/countries/VI_COMMON.json (20)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: PPsyrius
PR: vacanza/holidays#2349
File: snapshots/countries/TW_COMMON.json:9-12
Timestamp: 2025-03-13T07:50:10.598Z
Learning: JSON files in the `snapshots/` directory (like `snapshots/countries/TW_COMMON.json`) are automatically generated by the `make snapshot` command and not meant to be manually edited.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: KJhellico
PR: vacanza/holidays#2629
File: holidays/countries/namibia.py:70-73
Timestamp: 2025-06-14T11:04:24.104Z
Learning: In Namibia's holiday system, holidays declared by presidential proclamation under Section 1(3) of the Public Holidays Act may not automatically be subject to the Sunday-to-Monday observation rule in Section 1(2), which primarily applies to holidays listed in the Schedule. Genocide Remembrance Day (May 28) starting in 2025 is treated as a fixed commemorative date without observed day handling.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.
Learnt from: KJhellico
PR: vacanza/holidays#2297
File: holidays/countries/united_states.py:528-534
Timestamp: 2025-03-06T12:36:48.071Z
Learning: Georgia and Indiana commemorate Washington's Birthday on December 24, not in February like the federal holiday. This is why the code uses Christmas Day as a reference point with the GA_IN_WASHINGTON_BIRTHDAY rule.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:124-130
Timestamp: 2025-06-14T18:58:55.499Z
Learning: In Guyana's holidays implementation (holidays/countries/guyana.py), Emancipation Day should be implemented as a fixed-date holiday on August 1st with weekend observance rules, not as the first Monday of August. This is confirmed by official Guyana Ministry of Home Affairs sources.
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/countries/turks_and_caicos_islands.py:117-118
Timestamp: 2025-05-13T13:23:11.375Z
Learning: The holidays library uses `_add_christmas_day_two` method to add Boxing Day holiday, not `_add_boxing_day`.
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:52-64
Timestamp: 2025-06-15T10:15:39.883Z
Learning: In the Anguilla holidays implementation, March 2 only has "James Ronald Webster Day" (from 2010 onwards). There is no "Sovereignty Day" holiday on this date. Queen's/King's Birthday holidays are in June, not March.
holidays/locale/en_US/LC_MESSAGES/US.po (16)
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:12-12
Timestamp: 2025-04-06T14:44:59.785Z
Learning: Use standardized .po file headers for localization files in the holidays project:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Other languages format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/locale/en_TT/LC_MESSAGES/TT.po:46-48
Timestamp: 2025-04-05T08:12:19.986Z
Learning: In the holidays library, localization (PO) files follow this convention: comments (#.) always use American English (en_US) spelling, while the msgid content follows the locale-specific spelling standards of the target language.
Learnt from: ankushhKapoor
PR: vacanza/holidays#2601
File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14
Timestamp: 2025-06-11T18:32:25.595Z
Learning: For non-default locale `.po` files, the header comment format is:
`# <Country> holidays <locale> localization.` (no trailing hash).
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299
Timestamp: 2025-03-05T17:51:00.633Z
Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.
Learnt from: KJhellico
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:75-76
Timestamp: 2025-04-05T09:44:39.998Z
Learning: In the holidays library, en_US locale is the standard for localization comments (using American English spelling like "Labor"), while the actual holiday names in code use the appropriate locale-specific spelling (like "Labour" for British English locales such as en_TT).
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0
Timestamp: 2025-04-06T14:52:35.679Z
Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95
Timestamp: 2025-06-25T20:55:00.642Z
Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.
Learnt from: PPsyrius
PR: vacanza/holidays#2388
File: holidays/locale/fr/LC_MESSAGES/CI.po:28-101
Timestamp: 2025-03-30T13:33:31.598Z
Learning: In the holidays library, for localization files of the default language (like French for Ivory Coast in fr/LC_MESSAGES/CI.po), the best practice is to leave the message strings (msgstr) empty to avoid possible typos, since the message IDs (msgid) are already in the target language.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:1-12
Timestamp: 2025-04-24T04:59:38.436Z
Learning: The holidays library uses a standard file header across country implementation files that includes copyright information, authors, website, and license details. New country implementation files should follow this same header format.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").
Learnt from: KJhellico
PR: vacanza/holidays#2259
File: holidays/locale/en_IN/LC_MESSAGES/IN.po:285-299
Timestamp: 2025-03-08T11:28:48.652Z
Learning: In the holidays project, message IDs (msgids) in locale files use region-specific naming conventions (e.g., "Muharram", "Id-ul-Fitr" in en_IN locale for India), while translator comments use internationally recognized names from the project's default locale (en_US) such as "Ashura", "Eid al-Fitr". This difference is intentional for proper localization.
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40
Timestamp: 2025-05-06T15:25:44.333Z
Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.
snapshots/countries/MP_COMMON.json (23)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Learnt from: KJhellico
PR: vacanza/holidays#2629
File: holidays/countries/namibia.py:70-73
Timestamp: 2025-06-14T11:04:24.104Z
Learning: In Namibia's holiday system, holidays declared by presidential proclamation under Section 1(3) of the Public Holidays Act may not automatically be subject to the Sunday-to-Monday observation rule in Section 1(2), which primarily applies to holidays listed in the Schedule. Genocide Remembrance Day (May 28) starting in 2025 is treated as a fixed commemorative date without observed day handling.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0
Timestamp: 2025-04-06T14:52:35.679Z
Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: holidays/countries/cape_verde.py:1-12
Timestamp: 2025-06-21T16:30:12.749Z
Learning: The holidays project does not use module docstrings in country holiday files. All country files start directly with the copyright header comment block without module docstrings, maintaining a consistent coding style across the project.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:300-319
Timestamp: 2025-06-18T10:21:01.376Z
Learning: In the France holidays implementation, legislative years for holiday changes should be hard-coded rather than extracted into constants, as this maintains consistency with the existing codebase pattern and provides historical accuracy for specific legislative acts.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: nalin-28
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:65-72
Timestamp: 2025-04-01T06:13:19.221Z
Learning: Guinea stopped recognizing "Second Republic Day" and "All Saint's Day" as public holidays from 2021 onwards.
Learnt from: KJhellico
PR: vacanza/holidays#2297
File: holidays/countries/united_states.py:528-534
Timestamp: 2025-03-06T12:36:48.071Z
Learning: Georgia and Indiana commemorate Washington's Birthday on December 24, not in February like the federal holiday. This is why the code uses Christmas Day as a reference point with the GA_IN_WASHINGTON_BIRTHDAY rule.
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:30-39
Timestamp: 2025-04-02T13:58:21.457Z
Learning: Second Republic Day in Guinea was abolished by at least 2022 according to Decree D/2022/0526/PRG/CNRD/SGG, and this is correctly implemented in the holidays library by only including the holiday for years up to and including 2021.
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:124-130
Timestamp: 2025-06-14T18:58:55.499Z
Learning: In Guyana's holidays implementation (holidays/countries/guyana.py), Emancipation Day should be implemented as a fixed-date holiday on August 1st with weekend observance rules, not as the first Monday of August. This is confirmed by official Guyana Ministry of Home Affairs sources.
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:52-64
Timestamp: 2025-06-15T10:15:39.883Z
Learning: In the Anguilla holidays implementation, March 2 only has "James Ronald Webster Day" (from 2010 onwards). There is no "Sovereignty Day" holiday on this date. Queen's/King's Birthday holidays are in June, not March.
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation, following the same pattern as in the Ivory Coast implementation.
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:171-184
Timestamp: 2025-06-19T02:34:14.456Z
Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
tests/countries/test_united_states.py (54)
<retrieved_learning>
Learnt from: KJhellico
PR: #2530
File: tests/countries/test_andorra.py:23-28
Timestamp: 2025-05-06T21:07:11.577Z
Learning: In the holidays project, test methods for country holidays follow a standard form where year ranges are explicitly recreated in each test method rather than being stored as class variables, to maintain consistency across all country tests.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:47:27.213Z
Learning: For holiday tests in the vacanza/holidays project, structure tests by individual holidays rather than by years. Each test method should focus on a specific holiday and test it across multiple years (from start_year through 2050) using helper methods like assertHolidayName
. For fixed holidays, use generators like (f"{year}-01-01" for year in range(1991, 2051))
. For movable holidays, specify individual dates for specific years followed by a range check.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2386
File: tests/countries/test_nepal.py:499-536
Timestamp: 2025-04-05T06:49:06.217Z
Learning: In the holidays project, test files follow a dual testing approach: individual methods test specific holidays across multiple years, while comprehensive year-specific tests (e.g., test_2025
) verify all holidays for a specific year in a single assertion. Both approaches serve different testing purposes and complement each other.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_united_states_virgin_islands.py:59-84
Timestamp: 2025-06-25T10:36:39.909Z
Learning: In the holidays library, test methods typically do not have docstrings. Only special test methods that need specific explanation (like edge cases or unique behaviors) have docstrings. Regular test methods like test_l10n_default, test_l10n_th, test_government_holidays, etc. should not have docstrings added.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2416
File: tests/countries/test_turkmenistan.py:85-86
Timestamp: 2025-04-05T04:29:38.042Z
Learning: For testing holiday implementations in the vacanza/holidays repository, recommend using from tests.common import CommonCountryTests
as the base class instead of directly using unittest.TestCase
to maintain consistency with project conventions and leverage common test utilities.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2398
File: tests/countries/test_guinea.py:237-239
Timestamp: 2025-04-02T18:38:35.164Z
Learning: In the vacanza/holidays project, the method assertLocalizedHolidays in country test files should be called with positional parameters rather than named parameters to maintain consistency with the rest of the codebase.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2615
File: tests/countries/test_anguilla.py:1-12
Timestamp: 2025-06-16T15:48:48.680Z
Learning: Test files in the holidays repository follow a standardized structure without module or class docstrings. All country test files use the same pattern: license header, imports, and class definition (class Test{Country}(CommonCountryTests, TestCase):
) without docstrings. This is an established codebase convention that should be maintained for consistency.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_puerto_rico.py:84-108
Timestamp: 2025-06-25T10:36:39.103Z
Learning: In the holidays library, test methods (including localization test methods like test_l10n_th, test_l10n_default) follow a standard library-wide approach of not including docstrings. This is the established convention across the codebase.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_american_samoa.py:83-107
Timestamp: 2025-06-25T10:39:18.504Z
Learning: In the holidays library, test methods (especially localization test methods like test_l10n_th, test_l10n_default) do not require docstrings as this is the standard library-wide approach.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_american_samoa.py:58-81
Timestamp: 2025-06-25T10:36:20.110Z
Learning: In the holidays library codebase, test methods typically do not include docstrings - this is the standard library-wide approach and should not be flagged as missing documentation.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_guam.py:59-82
Timestamp: 2025-06-25T10:35:02.394Z
Learning: In the holidays library, test methods do not require docstrings as this is the standard library-wide approach used consistently across the codebase.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_united_states.py:2194-2299
Timestamp: 2025-06-25T10:37:45.556Z
Learning: In the holidays library, test methods do not include docstrings as this is the standard library-wide approach. The library relies on descriptive method names to convey the purpose of test methods instead of docstrings.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_northern_mariana_islands.py:51-51
Timestamp: 2025-06-25T10:36:00.237Z
Learning: In the holidays library, test methods intentionally do not include docstrings as part of the standard library-wide coding approach.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_united_states_virgin_islands.py:86-112
Timestamp: 2025-06-25T10:35:32.591Z
Learning: In the holidays library, test methods do not include docstrings as this is the standard library-wide approach and coding convention.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2678
File: tests/countries/test_united_states_minor_outlying_islands.py:75-94
Timestamp: 2025-06-25T10:39:25.676Z
Learning: In the holidays library, test methods do not include docstrings. This is the standard library-wide approach used consistently across all test files.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2671
File: tests/countries/test_libya.py:19-24
Timestamp: 2025-06-22T21:36:18.015Z
Learning: In the vacanza/holidays project, test classes for countries do not use docstrings. All test classes follow the same pattern: class declaration directly followed by @classmethod def setUpClass(cls) without any docstrings for the class or methods.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2416
File: tests/countries/test_turkmenistan.py:31-49
Timestamp: 2025-04-05T04:50:40.752Z
Learning: For Turkmenistan holiday tests, use this class structure: class TestTurkmenistan(CommonCountryTests, TestCase)
with imports from unittest import TestCase
, from holidays.countries import Turkmenistan, TM, TKM
, and from tests.common import CommonCountryTests
. Ensure to call super().setUp()
in the setUp method.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2642
File: tests/countries/test_wallis_and_futuna.py:19-23
Timestamp: 2025-06-18T17:01:58.067Z
Learning: In the vacanza/holidays repository, the standard pattern for test class setUpClass methods is super().setUpClass(HolidayClass)
or super().setUpClass(HolidayClass, years=...)
where HolidayClass is passed as the first argument. This is the correct signature that matches the CommonCountryTests.setUpClass method which accepts test_class as the first parameter after cls. Pylint warnings about parameter count mismatch are false positives when comparing against TestCase.setUpClass instead of the immediate parent CommonCountryTests.setUpClass.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2642
File: tests/countries/test_wallis_and_futuna.py:19-23
Timestamp: 2025-06-18T17:01:58.067Z
Learning: In the vacanza/holidays repository, the standard pattern for test class setUpClass methods is super().setUpClass(HolidayClass)
where HolidayClass is passed as the first argument. This is the correct signature used across all country test files.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2416
File: tests/countries/test_turkmenistan.py:52-64
Timestamp: 2025-04-05T04:33:53.254Z
Learning: For Turkmenistan holiday tests, recommend using CommonCountryTests as the base class rather than unittest.TestCase to follow project conventions, be consistent with other country test files, and gain access to common test utilities.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2609
File: holidays/countries/nauru.py:57-60
Timestamp: 2025-06-14T11:04:31.180Z
Learning: In the holidays library, the base HolidayBase._populate()
method already includes a guard clause that prevents holiday population methods like _populate_public_holidays()
from being called when the year is before start_year
or after end_year
. Therefore, individual country implementations do not need to add their own guard clauses for years before independence or other start dates.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are properly covered by the test_eid_al_fitr_day() method, which tests both the regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2398
File: holidays/countries/guinea.py:106-110
Timestamp: 2025-04-04T10:52:41.546Z
Learning: In the Guinea holidays implementation, observed Eid al-Fitr cases are covered by the test_eid_al_fitr_day() method, which tests both regular holiday dates and the observed dates when the holiday falls on a non-working day (for years >= 2023).
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2386
File: holidays/countries/nepal.py:203-208
Timestamp: 2025-05-01T19:13:44.664Z
Learning: Multiple holidays on the same date are properly handled in the holidays library. When multiple _add_...
methods are called with different holiday names for the same date, both holidays are preserved rather than the latter overwriting the former. This happens because the __setitem__
method in HolidayBase
merges multiple holidays on the same date by combining their names.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2631
File: holidays/countries/sint_maarten.py:94-95
Timestamp: 2025-06-14T20:43:15.370Z
Learning: The _add_*
helper methods in the holidays library (such as _add_christmas_day_two()
, _add_labor_day()
, etc.) don't have default holiday names, so the name parameter should always be explicitly specified when calling these methods.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2609
File: holidays/countries/nauru.py:48-50
Timestamp: 2025-06-14T11:05:21.250Z
Learning: In the holidays library, newer implementations use start_year
to indicate the earliest year with complete holiday data coverage, not necessarily the first year a holiday existed. If a holiday system starts partway through a year (like Nauru's Public Holidays Act starting Jan 31, 1968), the start_year should be set to the following year (1969) to ensure users get full annual holiday coverage.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like _add_diwali
, which provide approximations when official dates aren't yet available.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2601
File: tests/countries/test_mongolia.py:128-156
Timestamp: 2025-06-15T11:52:39.572Z
Learning: In the vacanza/holidays project tests, when testing holidays that span multiple consecutive days across many years (like Mongolia's National Festival spanning July 11-13), prefer explicit for loops over complex nested generator expressions with unpacking. The explicit loops are more readable, easier to maintain, and better communicate the testing intent even though the Big O complexity is equivalent.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2642
File: tests/countries/test_france.py:24-27
Timestamp: 2025-06-18T10:10:46.158Z
Learning: The holidays library prioritizes full test coverage over performance in test suites. Modern library-wide standards favor comprehensive testing across all subdivisions and wide year ranges (e.g., 1803-2050 for France) to ensure thorough validation, even if it creates many test objects.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2642
File: holidays/countries/french_southern_territories.py:41-44
Timestamp: 2025-06-18T10:07:58.780Z
Learning: Territorial holiday classes that inherit from parent countries (like HolidaysAX from Finland, HolidaysSJ from Norway, HolidaysTF from France) follow a standard pattern of silently overriding self.subdiv in their _populate_public_holidays() method without validation, as this ensures they always use the correct subdivision code for their territory regardless of user input.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2642
File: holidays/countries/france.py:178-182
Timestamp: 2025-06-18T10:18:59.447Z
Learning: In the France holidays implementation, deprecated subdivision names like "Alsace-Moselle" and "Saint-Barthélémy" are handled through explicit conditionals in _populate_public_holidays() that map them to their corresponding new subdivision-specific holiday population methods, providing backward compatibility while users transition to the new ISO codes.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2642
File: holidays/countries/france.py:184-206
Timestamp: 2025-06-18T10:58:28.058Z
Learning: In the holidays library France implementation, creating shared private methods between subdivision-specific holiday population methods (like _populate_subdiv_57_public_holidays and _populate_subdiv_6ae_public_holidays) is not supported by the current framework architecture, so duplicate code between functionally identical subdivision methods should be left as-is.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2642
File: holidays/countries/france.py:178-180
Timestamp: 2025-06-18T10:26:50.180Z
Learning: In the France holidays implementation, the _populate_subdiv_57_public_holidays() (Moselle) and _populate_subdiv_6ae_public_holidays() (Alsace) methods are functionally identical, both adding Good Friday (≥1893) and Saint Stephen's Day (≥1892) with the same legal references from August 16th, 1892. Therefore, for the deprecated "Alsace-Moselle" subdivision, calling either method produces the same result.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2297
File: holidays/countries/united_states.py:528-534
Timestamp: 2025-03-06T12:36:48.071Z
Learning: Georgia and Indiana commemorate Washington's Birthday on December 24, not in February like the federal holiday. This is why the code uses Christmas Day as a reference point with the GA_IN_WASHINGTON_BIRTHDAY rule.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2483
File: holidays/countries/turks_and_caicos_islands.py:117-118
Timestamp: 2025-05-13T13:23:11.375Z
Learning: The holidays library uses _add_christmas_day_two
method to add Boxing Day holiday, not _add_boxing_day
.
</retrieved_learning>
<retrieved_learning>
Learnt from: Wasif-Shahzad
PR: #2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like _add_holiday_2nd_tue_of_feb()
and _add_holiday_1st_sun_of_mar()
use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2532
File: tests/countries/test_cocos_islands.py:78-89
Timestamp: 2025-05-12T15:31:58.079Z
Learning: In the holidays project, tests for movable holidays (like Easter Monday) should always use static date sets only, not calculation functions.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2402
File: holidays/countries/trinidad_and_tobago.py:85-92
Timestamp: 2025-04-25T20:27:59.086Z
Learning: The _populate_observed
method in holiday classes should maintain the same signature as the parent class ObservedHolidayBase
, even if specific child class implementations don't use all parameters.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2362
File: tests/test_ical.py:31-40
Timestamp: 2025-03-23T16:59:25.794Z
Learning: In the holidays library's TestIcalExporter
class, initializing ICalExporter
with None
is intentional. Using a mock object instead breaks tests because the constructor performs attribute validation with getattr(self.holidays, "language", None)
which returns a mock with a mock object instead of None
, causing validation failures. The approach isolates file operation tests from iCal generation logic.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2601
File: holidays/countries/mongolia.py:140-146
Timestamp: 2025-06-15T11:50:44.366Z
Learning: The holidays library doesn't currently have helper functions like _add_holiday_span
for adding consecutive multi-day holidays. Countries like Mongolia, Thailand, and Vietnam implement multi-day holiday spans using inline loops with _timedelta(dt, delta)
pattern.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the special_public_holidays_observed
dictionary in FijiStaticHolidays
is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
</retrieved_learning>
<retrieved_learning>
Learnt from: KJhellico
PR: #2140
File: holidays/holiday_base.py:1202-1208
Timestamp: 2025-03-27T20:10:31.188Z
Learning: The pop_named
method in HolidayBase should maintain its existing error handling behavior of raising a KeyError when no matching holidays are found, rather than returning an empty list.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2638
File: holidays/countries/svalbard_and_jan_mayen.py:26-32
Timestamp: 2025-06-16T11:46:35.303Z
Learning: In the holidays library, Norwegian subdivisions all yield the same holiday results regardless of the subdivision code used. This is similar to how Åland is implemented as a simple alias of Finland holidays with just a country code override.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2638
File: holidays/countries/svalbard_and_jan_mayen.py:26-32
Timestamp: 2025-06-16T11:46:35.303Z
Learning: In the holidays library, Norwegian subdivisions all yield the same holiday results regardless of the subdivision code used. This is similar to how Åland is implemented as a simple alias of Finland holidays with just a country code override.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2638
File: holidays/countries/svalbard_and_jan_mayen.py:26-32
Timestamp: 2025-06-16T11:46:35.303Z
Learning: In the holidays library, Norwegian subdivisions all yield the same holiday results regardless of the subdivision code used. This is similar to how Åland is implemented as a simple alias of Finland holidays with just a country code override.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2629
File: tests/countries/test_namibia.py:22-23
Timestamp: 2025-06-14T10:58:43.636Z
Learning: In the vacanza/holidays project, country test files consistently use range(start_year, 2050) which intentionally excludes 2050 and stops at 2049. This is a library-wide implementation pattern, not an off-by-one error.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2632
File: holidays/countries/solomon_islands.py:137-156
Timestamp: 2025-06-15T08:29:43.235Z
Learning: In Solomon Islands holidays implementation, Capital Territory (CT/Honiara) does not observe any provincial day holiday, including Guadalcanal's Province Day, despite being geographically located on Guadalcanal island. CT was split from Guadalcanal Province in 1983 to become a separate self-governing territory and does not have or observe provincial day holidays.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
</retrieved_learning>
<retrieved_learning>
Learnt from: PPsyrius
PR: #2407
File: holidays/locale/en_TL/LC_MESSAGES/TL.po:42-44
Timestamp: 2025-04-03T05:58:00.033Z
Learning: The en_TL (English for Timor-Leste) localization for holidays intentionally uses "World" instead of "International" (e.g., "World Labour Day") to maintain accuracy with official Timor-Leste government sources, even though code comments and other localizations like en_US use "International".
</retrieved_learning>
holidays/countries/united_states.py (60)
Learnt from: KJhellico
PR: vacanza/holidays#2635
File: holidays/countries/bhutan.py:13-16
Timestamp: 2025-06-16T14:08:09.492Z
Learning: In the holidays library, translation is performed in the `_add_holiday` methods, not at the string level. Holiday strings passed to `_add_holiday_*` methods are processed through the translation machinery within those methods, so using `tr()` or `self.tr()` wrappers is unnecessary.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:0-0
Timestamp: 2025-05-10T04:32:15.760Z
Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:12-12
Timestamp: 2025-04-06T14:44:59.785Z
Learning: Use standardized .po file headers for localization files in the holidays project:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Other languages format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
Learnt from: PPsyrius
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:78-90
Timestamp: 2025-06-13T12:18:03.539Z
Learning: The holidays codebase now uses the constructor signature pattern `__init__(self, *args, islamic_show_estimated: bool = True, **kwargs)` across country classes.
Learnt from: PPsyrius
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:95-98
Timestamp: 2025-06-16T12:28:31.641Z
Learning: Library-wide holiday patterns and their optimizations should be handled at the base class level (like InternationalHolidays) rather than documenting workarounds in individual country modules. This maintains separation of concerns and avoids documentation duplication.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants internally through parent class implementations even when these constants don't appear directly in the file. Removing imports that seem unused based on a simple text search could break functionality.
Learnt from: PPsyrius
PR: vacanza/holidays#2437
File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0
Timestamp: 2025-04-06T14:52:35.679Z
Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format:
- Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #"
- Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88
Timestamp: 2025-03-30T18:25:07.087Z
Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:195-199
Timestamp: 2025-05-09T18:34:33.990Z
Learning: In the holidays library, localization (l10n) is handled through separate .po files for different languages rather than combining multiple translations in a single string. The code should use the default language with tr() function, and translations are provided in language-specific .po files.
Learnt from: PPsyrius
PR: vacanza/holidays#2601
File: holidays/countries/mongolia.py:25-30
Timestamp: 2025-06-24T18:25:25.165Z
Learning: In the holidays project, reference URLs in docstrings/comments that exceed 100 characters are acceptable if they pass the pre-commit tests, even if Pylint flags them as line length violations.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: KJhellico
PR: vacanza/holidays#2671
File: holidays/countries/libya.py:25-25
Timestamp: 2025-06-22T21:34:15.792Z
Learning: In the holidays project, Reference URLs in docstrings are kept as complete markdown links on single lines even when they exceed 100 characters, prioritizing reference readability over line length limits.
Learnt from: PPsyrius
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:73-77
Timestamp: 2025-04-03T12:36:41.201Z
Learning: In the Holidays library, comments explaining year restrictions for holidays should be placed above the year check conditional statement, not inside it. Example format:
```python
# reason why goes here
if start_year <= self._year <= end_year:
# Holiday name
self._add_holiday_function(tr("Holiday Name"))
```
Learnt from: KJhellico
PR: vacanza/holidays#2459
File: holidays/locale/en_HK/LC_MESSAGES/HK.po:190-191
Timestamp: 2025-04-10T10:58:12.704Z
Learning: The maximum line length for .po files in the holidays repository is 99 characters. Comment lines should be consolidated only if the resulting line doesn't exceed this limit.
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: holidays/countries/cape_verde.py:1-12
Timestamp: 2025-06-21T16:30:12.749Z
Learning: The holidays project does not use module docstrings in country holiday files. All country files start directly with the copyright header comment block without module docstrings, maintaining a consistent coding style across the project.
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: holidays/countries/faroe_islands.py:0-0
Timestamp: 2025-06-06T13:23:16.229Z
Learning: Never suggest breaking long URLs in code comments or documentation. If something passes the pre-commit check, then it's allowed and should not be flagged for line length violations.
Learnt from: KJhellico
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:28-54
Timestamp: 2025-06-15T15:10:20.360Z
Learning: In the vacanza/holidays project, ruff configuration allows longer docstring lines than the typical 100-character limit, so docstring reference lines that exceed standard line length limits are acceptable and won't be flagged by ruff format during pre-commit checks.
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:20-24
Timestamp: 2025-06-16T15:48:33.931Z
Learning: The holidays project uses `make pre-commit` test which includes `ruff` as the primary linter. If `ruff` passes, then Pylint warnings that don't appear in `ruff` are considered acceptable and can be ignored.
Learnt from: KJhellico
PR: vacanza/holidays#2632
File: holidays/countries/solomon_islands.py:28-54
Timestamp: 2025-06-15T15:10:20.360Z
Learning: The vacanza/holidays project uses ruff with line-length = 99 characters (configured in pyproject.toml), not the standard 80 or 100 character limits. When pre-commit checks pass, the formatting is compliant with the project's specific ruff configuration.
Learnt from: PPsyrius
PR: vacanza/holidays#2637
File: holidays/countries/singapore.py:49-50
Timestamp: 2025-06-16T11:17:34.671Z
Learning: For the vacanza/holidays project, defer to ruff's line length rules rather than pylint's C0301 warnings. If ruff passes in pre-commit tests, line length is acceptable regardless of pylint warnings about exceeding 100 characters.
Learnt from: PPsyrius
PR: vacanza/holidays#2398
File: holidays/groups/islamic.py:301-301
Timestamp: 2025-04-01T14:14:01.519Z
Learning: Running `make pre-commit` in the holidays project can automatically fix common code style issues like whitespace in blank lines.
Learnt from: PPsyrius
PR: vacanza/holidays#2600
File: holidays/countries/philippines.py:56-56
Timestamp: 2025-06-05T18:24:26.712Z
Learning: In the holidays repository, if code passes `make pre-commit` checks, then it's allowed regardless of individual static analysis tool warnings like Pylint line length violations. The pre-commit hooks are the definitive source of truth for their coding standards.
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:30-30
Timestamp: 2025-06-07T07:37:55.516Z
Learning: For the vacanza/holidays repository, defer to the ruff configuration and pre-commit checks for coding standards rather than making manual suggestions about line length or style issues. If the automated checks pass, the code follows the project's standards.
Learnt from: PPsyrius
PR: vacanza/holidays#2594
File: holidays/countries/micronesia.py:25-30
Timestamp: 2025-06-04T11:06:21.179Z
Learning: In the holidays repository, line length formatting should defer to pre-commit formatting checks rather than manual suggestions. If pre-commit allows it, the formatting is acceptable per project policy.
Learnt from: PPsyrius
PR: vacanza/holidays#2599
File: holidays/countries/__init__.py:193-193
Timestamp: 2025-06-05T09:31:22.753Z
Learning: For the holidays Python library, when encountering line length or formatting issues, suggest contributors run `make pre-commit` to auto-format their files instead of providing specific manual formatting fixes like line splitting or noqa comments.
Learnt from: PPsyrius
PR: vacanza/holidays#2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:30-30
Timestamp: 2025-06-07T07:37:55.516Z
Learning: For the vacanza/holidays repository, coding standards and line length limits should follow what is allowed by the ruff linter configuration used in the pre-commit checks, not arbitrary 100-character limits.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: KJhellico
PR: vacanza/holidays#2530
File: holidays/countries/andorra.py:13-14
Timestamp: 2025-05-06T15:29:31.893Z
Learning: In this codebase, `tr` imported as `from gettext import gettext as tr` is used as a message marker for extracting translatable strings when generating .po files, not just for runtime translation.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: KJhellico
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:63-70
Timestamp: 2025-03-23T10:11:50.465Z
Learning: In the holidays library, the `SAT_SUN_TO_NEXT_MON_TUE` rule is specifically used for consecutive holidays (like Christmas Day and Boxing Day) to ensure they're observed on separate weekdays (Monday and Tuesday) when they fall on weekends, while `SAT_SUN_TO_NEXT_MON` is used as the default rule for other holidays.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: KJhellico
PR: vacanza/holidays#2606
File: holidays/countries/faroe_islands.py:62-67
Timestamp: 2025-06-15T15:24:53.055Z
Learning: The `HolidayBase` class uses `__getattr__` to dynamically implement `_add_holiday_*` methods through pattern matching, including patterns like `_add_holiday_<n>_days_past_easter`, `_add_holiday_<month>_<day>`, and various weekday-relative patterns. Methods like `_add_holiday_26_days_past_easter` are not explicitly defined but are dynamically generated when called.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: tests/countries/test_finland.py:23-26
Timestamp: 2025-05-09T18:36:09.607Z
Learning: The holidays project prioritizes complete historical coverage in tests, verifying holidays from their first year of observance (e.g., 1853 for Finland) through future projections, rather than using shorter sliding windows.
Learnt from: PPsyrius
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:25-25
Timestamp: 2025-04-02T04:54:07.204Z
Learning: For English-speaking countries in the holidays library (like Trinidad and Tobago), the `default_language` and `supported_languages` parameters are optional. If languages are added for such countries, ensure that `en_US` is included in the list alongside the regional code variant (e.g., `en_TT` for Trinidad and Tobago).
Learnt from: PPsyrius
PR: vacanza/holidays#2609
File: holidays/countries/nauru.py:57-60
Timestamp: 2025-06-14T11:04:31.180Z
Learning: In the holidays library, the base `HolidayBase._populate()` method already includes a guard clause that prevents holiday population methods like `_populate_public_holidays()` from being called when the year is before `start_year` or after `end_year`. Therefore, individual country implementations do not need to add their own guard clauses for years before independence or other start dates.
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:39-44
Timestamp: 2025-06-07T11:19:38.945Z
Learning: In the holidays library, it's standard practice to explicitly call ChristianHolidays.__init__(self) and InternationalHolidays.__init__(self) in country class __init__ methods, even when these mixins don't define their own __init__ methods. This follows the established codebase convention across all country implementations (confirmed in Zimbabwe, Zambia, and other countries).
Learnt from: KJhellico
PR: vacanza/holidays#2608
File: holidays/countries/saint_vincent_and_the_grenadines.py:39-44
Timestamp: 2025-06-07T11:19:38.945Z
Learning: In the holidays library, it's standard practice to explicitly call ChristianHolidays.__init__(self) and InternationalHolidays.__init__(self) in country class __init__ methods, even when these mixins don't define their own __init__ methods. This follows the established codebase convention across all country implementations.
Learnt from: KJhellico
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:52-60
Timestamp: 2025-04-13T20:42:13.152Z
Learning: In the holidays library, country classes follow a consistent initialization pattern: first explicitly initializing each parent holiday group class with their specific parameters, then calling `super().__init__(*args, **kwargs)` at the end to properly initialize the base `HolidayBase` class.
Learnt from: KJhellico
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:24-26
Timestamp: 2025-03-30T20:18:46.006Z
Learning: In the holidays library, country classes do not directly implement `_populate()`. Instead, they implement specialized methods like `_populate_public_holidays()`, and the base class `HolidayBase` handles the orchestration by calling these specialized methods.
Learnt from: ankushhKapoor
PR: vacanza/holidays#2386
File: holidays/countries/nepal.py:29-34
Timestamp: 2025-03-29T17:55:09.799Z
Learning: In the holidays library, classes with multiple inheritance from various holiday groups (like ChristianHolidays, HinduCalendarHolidays, etc.) should initialize each parent class separately rather than using `super().__init__(*args, **kwargs)` because the parent classes have different parameter requirements. HolidayBase should receive the `*args, **kwargs` while other holiday group classes typically don't accept parameters like `observed`.
Learnt from: KJhellico
PR: vacanza/holidays#2402
File: holidays/countries/trinidad_and_tobago.py:85-92
Timestamp: 2025-04-25T20:27:59.086Z
Learning: The `_populate_observed` method in holiday classes should maintain the same signature as the parent class `ObservedHolidayBase`, even if specific child class implementations don't use all parameters.
Learnt from: KJhellico
PR: vacanza/holidays#2525
File: holidays/countries/togo.py:0-0
Timestamp: 2025-05-04T10:29:46.780Z
Learning: When a country class in the holidays library uses additional categories beyond PUBLIC, the `supported_categories` tuple should contain all categories, including PUBLIC. Only when PUBLIC is the only category being used should it be omitted from `supported_categories`.
Learnt from: KJhellico
PR: vacanza/holidays#2437
File: holidays/countries/bhutan.py:27-30
Timestamp: 2025-04-08T14:46:10.656Z
Learning: For country classes in the holidays library, there's no need to explicitly specify `supported_categories = (PUBLIC,)` when PUBLIC is the only category being used, as it's already the default category inherited from HolidayBase.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/french_southern_territories.py:41-44
Timestamp: 2025-06-18T10:07:58.780Z
Learning: Territorial holiday classes that inherit from parent countries (like HolidaysAX from Finland, HolidaysSJ from Norway, HolidaysTF from France) follow a standard pattern of silently overriding self.subdiv in their _populate_public_holidays() method without validation, as this ensures they always use the correct subdivision code for their territory regardless of user input.
Learnt from: KJhellico
PR: vacanza/holidays#2297
File: holidays/countries/united_states.py:528-534
Timestamp: 2025-03-06T12:36:48.071Z
Learning: Georgia and Indiana commemorate Washington's Birthday on December 24, not in February like the federal holiday. This is why the code uses Christmas Day as a reference point with the GA_IN_WASHINGTON_BIRTHDAY rule.
Learnt from: KJhellico
PR: vacanza/holidays#2631
File: holidays/countries/sint_maarten.py:94-95
Timestamp: 2025-06-14T20:43:15.370Z
Learning: The `_add_*` helper methods in the holidays library (such as `_add_christmas_day_two()`, `_add_labor_day()`, etc.) don't have default holiday names, so the name parameter should always be explicitly specified when calling these methods.
Learnt from: KJhellico
PR: vacanza/holidays#2483
File: holidays/countries/turks_and_caicos_islands.py:117-118
Timestamp: 2025-05-13T13:23:11.375Z
Learning: The holidays library uses `_add_christmas_day_two` method to add Boxing Day holiday, not `_add_boxing_day`.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-180
Timestamp: 2025-06-18T10:26:50.180Z
Learning: In the France holidays implementation, the _populate_subdiv_57_public_holidays() (Moselle) and _populate_subdiv_6ae_public_holidays() (Alsace) methods are functionally identical, both adding Good Friday (≥1893) and Saint Stephen's Day (≥1892) with the same legal references from August 16th, 1892. Therefore, for the deprecated "Alsace-Moselle" subdivision, calling either method produces the same result.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation.
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation, following the same pattern as in the Ivory Coast implementation.
Learnt from: KJhellico
PR: vacanza/holidays#2388
File: holidays/countries/ivory_coast.py:127-128
Timestamp: 2025-03-30T18:22:11.939Z
Learning: The IvoryCoast class in holidays/countries/ivory_coast.py already includes documentation in its class docstring explaining the "day after" naming convention for Islamic holidays, noting that in the Islamic calendar, days begin at sunset and the "day after" refers to daylight hours following the night of celebration.
Learnt from: KJhellico
PR: vacanza/holidays#2651
File: holidays/locale/pap_BQ/LC_MESSAGES/BQ.po:70-72
Timestamp: 2025-06-25T14:08:09.323Z
Learning: The Papiamento translation "Di dos dia di Pasku" for "Tweede Kerstdag" (Boxing Day) in holidays/locale/pap_BQ/LC_MESSAGES/BQ.po comes from an authoritative source, despite the literal meaning potentially seeming to refer to Easter rather than Christmas.
Learnt from: PPsyrius
PR: vacanza/holidays#2609
File: holidays/countries/nauru.py:48-50
Timestamp: 2025-06-14T11:05:21.250Z
Learning: In the holidays library, newer implementations use `start_year` to indicate the earliest year with complete holiday data coverage, not necessarily the first year a holiday existed. If a holiday system starts partway through a year (like Nauru's Public Holidays Act starting Jan 31, 1968), the start_year should be set to the following year (1969) to ensure users get full annual holiday coverage.
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:171-184
Timestamp: 2025-06-19T02:34:14.456Z
Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
snapshots/countries/US_MP.json (23)
Learnt from: PPsyrius
PR: vacanza/holidays#2407
File: snapshots/countries/TL_COMMON.json:7-7
Timestamp: 2025-04-03T05:59:57.480Z
Learning: In the holidays project, snapshot files (like snapshots/countries/TL_COMMON.json) are auto-generated when running `make snapshot` and should not be manually edited. Semicolons (;) in holiday entries are used as separators when multiple holidays occur on the same date.
Learnt from: KJhellico
PR: vacanza/holidays#2654
File: snapshots/countries/CV_RS.json:471-478
Timestamp: 2025-06-24T17:26:17.728Z
Learning: Snapshot files in the holidays library (like those in snapshots/countries/) are generated automatically and should not be manually edited. Any issues with snapshot content should be addressed in the source code that generates them, not in the snapshot files themselves.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:86-88
Timestamp: 2025-04-23T09:22:41.753Z
Learning: For holiday definitions in the holidays package, keep comments simple with just the holiday name (e.g., "# Independence Day.") rather than including dates or historical context, as the function names already encode the date information.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:185-188
Timestamp: 2025-03-19T16:53:00.375Z
Learning: In the Fiji holidays implementation, the `special_public_holidays_observed` dictionary in `FijiStaticHolidays` is only used for exceptions to the normal observance rules, not for documenting all holidays. Only 2019's Constitution Day needed a special entry as it didn't follow the standard patterns.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: PPsyrius
PR: vacanza/holidays#2489
File: holidays/countries/sao_tome_and_principe.py:22-26
Timestamp: 2025-04-23T14:55:35.504Z
Learning: References in holidays classes should only be included if they're used for test case cross-checks or provide historical context about when holidays were added/removed, not just for the sake of having more references.
Learnt from: KJhellico
PR: vacanza/holidays#2629
File: holidays/countries/namibia.py:70-73
Timestamp: 2025-06-14T11:04:24.104Z
Learning: In Namibia's holiday system, holidays declared by presidential proclamation under Section 1(3) of the Public Holidays Act may not automatically be subject to the Sunday-to-Monday observation rule in Section 1(2), which primarily applies to holidays listed in the Schedule. Genocide Remembrance Day (May 28) starting in 2025 is treated as a fixed commemorative date without observed day handling.
Learnt from: PPsyrius
PR: vacanza/holidays#2642
File: holidays/countries/france.py:178-182
Timestamp: 2025-06-18T10:12:57.419Z
Learning: In the France holidays implementation, subdivisions like "GES" and "Metropole" that covered multiple departments with different holiday rules are completely deprecated rather than aliased, because aliasing them to a subset (like Alsace-Moselle) would provide incomplete or incorrect holiday data for the other covered regions. Complete deprecation is preferred over partial/incorrect data coverage.
Learnt from: PPsyrius
PR: vacanza/holidays#2537
File: holidays/countries/finland.py:249-253
Timestamp: 2025-05-10T04:02:13.815Z
Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:144-169
Timestamp: 2025-06-19T02:34:18.382Z
Learning: Custom holiday classes that extend _CustomHinduHolidays, _CustomIslamicHolidays, _CustomBuddhistHolidays, etc. in the holidays library do not use docstrings. They follow a pattern of using only inline comments above date dictionaries, as seen in Malaysia, Singapore, UAE, and other country implementations.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2409
File: holidays/countries/qatar.py:27-46
Timestamp: 2025-04-03T16:58:27.175Z
Learning: In the holidays library, method names like `_add_holiday_2nd_tue_of_feb()` and `_add_holiday_1st_sun_of_mar()` use calendar constants like FEB, TUE, MAR, and SUN internally through parent class implementations even when these constants don't appear directly in the file.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (`government`, `mandatory`, and `public`), which are utilized by syntactic sugar methods.
Learnt from: PPsyrius
PR: vacanza/holidays#2354
File: holidays/countries/fiji.py:146-159
Timestamp: 2025-03-19T16:54:58.657Z
Learning: In the holidays library implementation, explicit holiday dates (like Diwali in Fiji) are only defined for historical years with official sources (2016-2025). Future dates beyond the explicitly defined range are automatically calculated by methods like `_add_diwali`, which provide approximations when official dates aren't yet available.
Learnt from: Wasif-Shahzad
PR: vacanza/holidays#2385
File: holidays/countries/pakistan.py:59-60
Timestamp: 2025-03-31T11:50:50.488Z
Learning: In the holidays library, function names and comments follow en_US spelling conventions (e.g., "Labor Day"), while the default strings may use different locale conventions (e.g., "Labour Day" for en_PK) and are translated appropriately using the gettext function.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: PPsyrius
PR: vacanza/holidays#2323
File: holidays/countries/macau.py:407-461
Timestamp: 2025-03-04T11:32:45.095Z
Learning: In the holidays library, the standard approach for organizing static holidays is to use separate dictionaries for different categories (like `special_government_holidays`, `special_mandatory_holidays`, and `special_public_holidays`), which are utilized by syntactic sugar methods to pick up the appropriate holidays based on the selected category.
Learnt from: nalin-28
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:65-72
Timestamp: 2025-04-01T06:13:19.221Z
Learning: Guinea stopped recognizing "Second Republic Day" and "All Saint's Day" as public holidays from 2021 onwards.
Learnt from: PPsyrius
PR: vacanza/holidays#2643
File: holidays/countries/mauritius.py:171-184
Timestamp: 2025-06-19T02:34:14.456Z
Learning: In the holidays library, `_CustomIslamicHolidays` subclasses follow a consistent pattern of NOT having docstrings. They go directly to defining date dictionaries, as evidenced by Malaysia, Singapore, UAE, and dozens of other country implementations.
Learnt from: KJhellico
PR: vacanza/holidays#2297
File: holidays/countries/united_states.py:528-534
Timestamp: 2025-03-06T12:36:48.071Z
Learning: Georgia and Indiana commemorate Washington's Birthday on December 24, not in February like the federal holiday. This is why the code uses Christmas Day as a reference point with the GA_IN_WASHINGTON_BIRTHDAY rule.
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: tests/countries/test_guinea.py:30-39
Timestamp: 2025-04-02T13:58:21.457Z
Learning: Second Republic Day in Guinea was abolished by at least 2022 according to Decree D/2022/0526/PRG/CNRD/SGG, and this is correctly implemented in the holidays library by only including the holiday for years up to and including 2021.
Learnt from: KJhellico
PR: vacanza/holidays#2614
File: holidays/countries/guyana.py:124-130
Timestamp: 2025-06-14T18:58:55.499Z
Learning: In Guyana's holidays implementation (holidays/countries/guyana.py), Emancipation Day should be implemented as a fixed-date holiday on August 1st with weekend observance rules, not as the first Monday of August. This is confirmed by official Guyana Ministry of Home Affairs sources.
Learnt from: PPsyrius
PR: vacanza/holidays#2615
File: tests/countries/test_anguilla.py:52-64
Timestamp: 2025-06-15T10:15:39.883Z
Learning: In the Anguilla holidays implementation, March 2 only has "James Ronald Webster Day" (from 2010 onwards). There is no "Sovereignty Day" holiday on this date. Queen's/King's Birthday holidays are in June, not March.
Learnt from: KJhellico
PR: vacanza/holidays#2398
File: holidays/countries/guinea.py:101-106
Timestamp: 2025-04-03T13:03:16.558Z
Learning: For Islamic holidays in Guinea like "Lendemain de la nuit Lailatoul Qadr" (Day after Night of Power) and "Lendemain de la nuit du Maoloud" (Day after Prophet's Birthday), the naming refers to the daylight hours following the night when these Islamic observances occur. Since in the Islamic calendar days begin at sunset rather than midnight, methods like `_add_laylat_al_qadr_day` and `_add_mawlid_day` correctly calculate these dates without requiring an additional day offset in the implementation, following the same pattern as in the Ivory Coast implementation.
🪛 Pylint (3.3.7)
tests/countries/test_united_states.py
[convention] 728-728: Missing function or method docstring
(C0116)
[convention] 833-833: Missing function or method docstring
(C0116)
[convention] 840-840: Missing function or method docstring
(C0116)
[convention] 964-964: Missing function or method docstring
(C0116)
[convention] 1039-1039: Missing function or method docstring
(C0116)
[convention] 1168-1168: Missing function or method docstring
(C0116)
[convention] 1233-1233: Missing function or method docstring
(C0116)
[convention] 1293-1293: Missing function or method docstring
(C0116)
[convention] 1404-1404: Missing function or method docstring
(C0116)
[convention] 1521-1521: Missing function or method docstring
(C0116)
[convention] 1545-1545: Missing function or method docstring
(C0116)
[convention] 1573-1573: Missing function or method docstring
(C0116)
[convention] 1700-1700: Missing function or method docstring
(C0116)
[convention] 1886-1886: Missing function or method docstring
(C0116)
[convention] 1893-1893: Missing function or method docstring
(C0116)
[convention] 1900-1900: Missing function or method docstring
(C0116)
[convention] 1907-1907: Missing function or method docstring
(C0116)
[convention] 1914-1914: Missing function or method docstring
(C0116)
[convention] 1983-1983: Missing function or method docstring
(C0116)
[convention] 2023-2023: Missing function or method docstring
(C0116)
[convention] 2119-2119: Missing function or method docstring
(C0116)
[convention] 2136-2136: Missing function or method docstring
(C0116)
[convention] 2244-2244: Missing function or method docstring
(C0116)
holidays/countries/united_states.py
[convention] 57-57: Line too long (138/100)
(C0301)
[convention] 58-58: Line too long (154/100)
(C0301)
[convention] 59-59: Line too long (153/100)
(C0301)
[convention] 60-60: Line too long (213/100)
(C0301)
[convention] 61-61: Line too long (251/100)
(C0301)
[convention] 62-62: Line too long (280/100)
(C0301)
[convention] 63-63: Line too long (171/100)
(C0301)
[refactor] 251-251: Too many branches (21/12)
(R0912)
[convention] 441-441: Line too long (149/100)
(C0301)
[convention] 1357-1357: Line too long (141/100)
(C0301)
[convention] 1358-1358: Line too long (111/100)
(C0301)
[convention] 1359-1359: Line too long (162/100)
(C0301)
[convention] 1360-1360: Line too long (125/100)
(C0301)
[convention] 1361-1361: Line too long (120/100)
(C0301)
[convention] 1362-1362: Line too long (120/100)
(C0301)
[convention] 1363-1363: Line too long (122/100)
(C0301)
[convention] 1364-1364: Line too long (122/100)
(C0301)
[convention] 1365-1365: Line too long (135/100)
(C0301)
[refactor] 1353-1353: Too few public methods (0/2)
(R0903)
⏰ Context from checks skipped due to timeout of 300000ms (5)
- GitHub Check: Test Python 3.11 on windows-latest
- GitHub Check: Test Python 3.13 on windows-latest
- GitHub Check: Test Python 3.12 on windows-latest
- GitHub Check: Test Python 3.9 on windows-latest
- GitHub Check: Test Python 3.10 on windows-latest
🔇 Additional comments (16)
snapshots/countries/US_MP.json (2)
22-23
: Good-Friday date fix looks correct
Good Friday in 1951 did in fact fall on March 23, so this update brings the snapshot in line with the proper Easter calculation.
345-355
: “(observed)” lines still present – contradicts PR summary
The AI summary claims all “(observed)” variants were dropped for US territories, yet lines 345-355 (and many others later) still include them. Please confirm whether the intention is to keep or remove these entries and regenerate the snapshot accordingly.#!/bin/bash # List any snapshot rows that still contain "(observed)" rg --count '\(observed\)' snapshots/countries/US_MP.jsonIf the count is non-zero, rerun
make snapshot
after resolving the underlying holiday-generation logic.> Likely an incorrect or invalid review comment. </details> <details> <summary>snapshots/countries/VI_COMMON.json (1)</summary> `60-80`: **Verify that the snapshot was regenerated, not hand-edited.** Snapshot files are produced by `make snapshot`; manual edits risk drifting from generated data. Please re-run the generator to confirm the diff is solely the result of code changes. While you’ve cleaned up several pre-1971 “(observed)” duplicates, later years (e.g., 1981-07-03 `"Emancipation Day; Independence Day (observed)"`) still contain multi-label strings. Double-check that this mixed style is intentional and that localisation tooling handles the remaining semicolon-separated labels correctly. Also applies to: 630-650, 1010-1035 </details> <details> <summary>snapshots/countries/US_LA.json (1)</summary> `735-735`: **Confirm snapshot was generated, not hand-edited** Only four MLK-Day lines differ from the prior snapshot. As snapshot files are meant to be produced by `make snapshot`, please confirm these deltas originate from the code (e.g., l10n tweaks) rather than a manual JSON edit. Also applies to: 1016-1016, 1232-1232, 1536-1536 </details> <details> <summary>snapshots/countries/US_VI.json (1)</summary> `70-80`: **Verify snapshot regeneration rather than manual editing** `snapshots/` artefacts are generated via `make snapshot`. Seeing direct diffs (‐ removal of “(observed)” variants) raises the question whether this file was tweaked by hand or produced after code changes to `holidays/`-logic. Please re-run `make check && make snapshot` on a clean branch and commit only the regenerated file to make sure the JSON truly reflects library behaviour. Also applies to: 118-124, 190-196, 218-224, 288-294, 338-344, 408-414 </details> <details> <summary>snapshots/countries/MP_COMMON.json (1)</summary> `340-356`: **“(observed)” records still present – PR description says they were removed.** The file is still full of “(observed)” entries (e.g., lines 345–355), which contradicts the PR summary claiming *all* observed snapshots were purged. Double-check the generation logic: either the snapshot wasn’t rebuilt after code changes, or the removal logic missed the Northern Mariana Islands dataset. > Likely an incorrect or invalid review comment. </details> <details> <summary>holidays/locale/en_US/LC_MESSAGES/US.po (1)</summary> `17-29`: **Missing `Plural-Forms` header – may break gettext plural handling.** Every PO header should declare `Plural-Forms`; other project files include it (e.g., `nplurals=2; plural=(n != 1);`). Add it to avoid runtime fallback surprises. ```diff "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Lingva 5.0.6\n"
⛔ Skipped due to learnings
Learnt from: PPsyrius PR: vacanza/holidays#2537 File: holidays/locale/sv_FI/LC_MESSAGES/AX.po:17-27 Timestamp: 2025-05-10T04:34:02.406Z Learning: The `Plural-Forms` header isn't used in .po file generation for the holidays project and doesn't need to be manually added to localization files.
Learnt from: KJhellico PR: vacanza/holidays#2608 File: holidays/locale/en_VC/LC_MESSAGES/VC.po:1-14 Timestamp: 2025-06-10T12:17:58.880Z Learning: In the holidays project, .po files should use the full multi-line header format including the project description, authors, website, and license information, rather than a single-line comment format.
Learnt from: PPsyrius PR: vacanza/holidays#2437 File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:12-12 Timestamp: 2025-04-06T14:44:59.785Z Learning: Use standardized .po file headers for localization files in the holidays project: - Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #" - Other languages format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #"
Learnt from: PPsyrius PR: vacanza/holidays#2437 File: holidays/locale/dz_BT/LC_MESSAGES/BT.po:0-0 Timestamp: 2025-04-06T14:52:35.679Z Learning: When suggesting changes to .po files in the holidays project, follow the standardized header format: - Default language format: "# [COUNTRY-NAME-NORMAL] holidays. #" - Non-default language format: "# [COUNTRY-NAME-NORMAL] holidays [LANGUAGE-CODE] localization. #" For example, for Bhutan in Dzongkha, use "# Bhutan holidays dz_BT localization. #"
Learnt from: PPsyrius PR: vacanza/holidays#2608 File: holidays/locale/en_US/LC_MESSAGES/VC.po:76-76 Timestamp: 2025-06-10T05:08:07.939Z Learning: For the holidays project, localization file formatting issues (like missing terminal periods in .po files) should be automatically fixed by running `make l10n` command (which is included in `make check`). Authors should be directed to use this automated tooling instead of manual formatting fixes.
Learnt from: ankushhKapoor PR: vacanza/holidays#2601 File: holidays/locale/en_MN/LC_MESSAGES/MN.po:13-14 Timestamp: 2025-06-11T18:32:25.595Z Learning: For non-default locale `.po` files, the header comment format is: `# <Country> holidays <locale> localization.` (no trailing hash).
Learnt from: KJhellico PR: vacanza/holidays#2259 File: holidays/locale/en_IN/LC_MESSAGES/IN.po:30-299 Timestamp: 2025-03-05T17:51:00.633Z Learning: In the Holidays project, .po files for a country's default locale use empty msgstr fields as a standard convention.
Learnt from: KJhellico PR: vacanza/holidays#2651 File: holidays/locale/nl/LC_MESSAGES/BQ.po:29-95 Timestamp: 2025-06-25T20:55:00.642Z Learning: In the holidays library, Dutch locale files (.po) with `X-Source-Language: nl` should have empty msgstr entries when the target language is also Dutch. The library uses fallback=True with gettext, which returns the original msgid when msgstr is empty. This is the correct pattern for native language files and does not cause blank holiday names.
Learnt from: PPsyrius PR: vacanza/holidays#2438 File: holidays/locale/ar_IQ/LC_MESSAGES/IQ.po:35-81 Timestamp: 2025-04-17T17:08:48.082Z Learning: In holiday PO files, when the file represents the default language of an entity (e.g., ar_IQ for Iraq), no translations in `msgstr` are required as the `msgid` values are already in the target language.
Learnt from: PPsyrius PR: vacanza/holidays#2608 File: holidays/locale/en_VC/LC_MESSAGES/VC.po:61-66 Timestamp: 2025-06-10T05:07:29.372Z Learning: For missing translator comments in .po localization files in the holidays repository, direct authors to run `make l10n` or `make check` commands instead of suggesting manual fixes, as these commands automatically handle translator comment generation.
Learnt from: KJhellico PR: vacanza/holidays#2388 File: holidays/locale/en_CI/LC_MESSAGES/CI.po:88-88 Timestamp: 2025-03-30T18:25:07.087Z Learning: In the holidays library, localization files have a specific structure: message comments are in standard English (en_US) describing the holiday, while actual translations (msgstr) should use the locale-specific terminology (e.g., en_CI for Ivory Coast English). For example, "Night of Power" in standard English is translated as "Lailatou-Kadr" in Ivory Coast English.
Learnt from: KJhellico PR: vacanza/holidays#2530 File: holidays/locale/ca/LC_MESSAGES/AD.po:31-40 Timestamp: 2025-05-06T15:25:44.333Z Learning: In the Holidays project, msgid fields in localization files contain strings in the entity's default language (as defined by default_language attribute), not English source strings as in standard gettext implementations.
Learnt from: PPsyrius PR: vacanza/holidays#2676 File: holidays/locale/ar/LC_MESSAGES/EG.po:0-0 Timestamp: 2025-06-25T10:09:29.029Z Learning: In the holidays library, msgstr fields can be left empty for source/default_language files when using Lingva, the localization tool used by the project.
Learnt from: PPsyrius PR: vacanza/holidays#2537 File: holidays/countries/finland.py:249-253 Timestamp: 2025-05-10T04:02:13.815Z Learning: Holiday name comments directly above tr() function calls in the holidays package should only contain the holiday name itself (e.g., "# Independence Day.") without any additional context, dates, or historical information.
Learnt from: PPsyrius PR: vacanza/holidays#2537 File: holidays/countries/finland.py:0-0 Timestamp: 2025-05-10T04:32:15.760Z Learning: In the holidays package, detailed historical context and additional information should be added as comments at the method level or above conditional blocks, while comments directly above tr() function calls should only contain the holiday name itself (e.g., "# Independence Day.").
tests/countries/test_united_states.py (4)
23-33
: Excellent historical coverage expansion and improved variable naming.The extension of the year range back to 1777 provides valuable historical coverage, and the variable renaming significantly improves code readability. The new descriptive names like
government_holidays
andsubdiv_holidays
make the test structure much clearer.
193-252
: Outstanding historical Thanksgiving coverage.Great work expanding the Thanksgiving Day tests to include comprehensive historical public holidays dating back to 1777. The distinction between public holidays (like "Public Thanksgiving and Prayer Day") and federal holidays is well-structured and historically accurate.
2136-2242
: Comprehensive English localization testing.Excellent coverage of default English localization with proper handling of complex holiday name combinations. The test effectively validates multiple holiday names for the same date and demonstrates thorough understanding of the US holiday system.
2244-2349
: Exceptional Thai localization implementation.Outstanding work on the Thai localization test. The translations are comprehensive and properly handle complex holiday name combinations. The Thai holiday names appear authentic and cover the full spectrum of US holidays including territorial and subdivision-specific holidays.
holidays/countries/united_states.py (5)
13-13
: LGTM - Clean localization setupThe import of
tr
from gettext and addition ofStaticHolidays
inheritance properly establishes the localization framework.Also applies to: 34-34, 51-51
111-114
: Solid language configurationThe default and supported languages properly implement Thai localization support as intended, and the observed label translation follows the correct pattern.
261-336
: Thorough translation implementationAll holiday names are properly wrapped in
tr()
calls and comments follow the correct format. The conditional naming for Veterans Day/Armistice Day and Thanksgiving Day logic maintains proper translation support.
355-1294
: Consistent subdivision translation patternExcellent work maintaining the translation pattern across all state and territory subdivisions. Each unique holiday name is properly wrapped while preserving state-specific naming conventions.
1353-1408
: Well-structured static holidays implementationThe new
UnitedStatesStaticHolidays
class properly implements special historical holidays with comprehensive documentation and correct translation wrapping for all holiday names.
This reverts commit 10fa587.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USA l10n it's a very powerful work, which I sometimes looked at but did not bring myself to do. :)
LGTM! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tremendous effort @PPsyrius
Thank you!
Proposed change
th
l10n for the United States (this should hopefully simplifies the process for adding other l10n for US later i.e.es
)Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green