Update India holidays: change 2026 Holi date in Maharashtra (MH)#3379
Update India holidays: change 2026 Holi date in Maharashtra (MH)#3379arkid15r merged 23 commits intovacanza:devfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
Summary by CodeRabbitRelease Notes
WalkthroughAdjusts India holiday logic so Holi is not added unconditionally: Maharashtra (subdiv "MH") skips Holi in optional holidays and receives a fixed Holi date for 2026; other subdivisions use the existing Holi calculation. The module docstring reference for MH 2026 was updated. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holidays/countries/india.py`:
- Around line 403-404: The call uses a non-existent method _add_holi_mar_3 which
will raise AttributeError; replace it depending on intent: if Holi should be
calculated use the existing base-class method _add_holi(name) (call
_add_holi(tr("Holi"))), otherwise if you truly need a hardcoded March 3 holiday
(e.g. for 2026 only) call the helper _add_holiday_mar_3(tr("Holi")); update the
invocation of _add_holi_mar_3 to one of these two valid methods in the india.py
file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 749425b5-9fef-45a8-807b-4a82c2f8c8b0
📒 Files selected for processing (1)
holidays/countries/india.py
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holidays/countries/india.py`:
- Around line 403-404: The MH override currently calls
self._add_holiday_mar_3(tr("Holi")) unconditionally, which applies the March 3
Holi to every year; wrap this call so it only runs for 2026 (e.g. check
self.year == 2026) so the March 3 addition is scoped to that single-year
correction in the MH holiday class/method where _add_holiday_mar_3 is invoked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6f7847e1-0085-4a92-99bb-f82f4a97ceb1
📒 Files selected for processing (1)
holidays/countries/india.py
|
@Devika9705, if this PR replaces #3358, it would be best to close the previous one. But the question of OPTIONAL holidays remains unresolved. |
|
Yes, this PR replaces #3358. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3379 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 313 313
Lines 18666 18672 +6
Branches 2383 2385 +2
=========================================
+ Hits 18666 18672 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
As I understand, Holi is a public holiday (Gazetted) in Maharashtra. So I would add it as public (with the date changed to 2026) and add an exclusion for Maharashtra to the nationwide optional list (you can see examples of similar exceptions in United States). |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holidays/countries/india.py`:
- Around line 404-408: Replace the ad-hoc 2026-specific assignment and the
fallback to _add_holi by calling the existing helper
_add_holiday_mar_3(tr("Holi")) so the holiday uses the standardized helper; this
removes the need for the explicit date(2026, 3, 3) usage and allows you to drop
the now-unused date import; update the block that currently references _add_holi
and the date literal to call _add_holiday_mar_3 with tr("Holi").
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ecff7710-0d7b-4282-838e-06e7dc2e1182
📒 Files selected for processing (1)
holidays/countries/india.py
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@holidays/countries/india.py`:
- Around line 45-47: The Maharashtra reference currently points to a live PDF
URL (<https://www.mcgm.gov.in/.../Public%20Holidays%202026.pdf>); archive that
URL (e.g., via web.archive.org) and replace or add the archived link alongside
the live link in the docstring for Maharashtra so the source remains
durable—locate the "Maharashtra:" entry in the module-level docstring (search
for the exact URL or the word "Maharashtra") and update the list to include the
archived web.archive.org URL (or append it in parentheses) while keeping the
original live URL for clarity.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b9a21044-34da-4eae-8f54-680e194eeaeb
📒 Files selected for processing (1)
holidays/countries/india.py
Signed-off-by: Devika Shukla <devikashukla80@gmail.com>
Signed-off-by: Devika Shukla <devikashukla80@gmail.com>
Signed-off-by: Devika Shukla <devikashukla80@gmail.com>
|
The changes must also be reflected in the tests. |
|
❌ The last analysis has failed. |
|
arkid15r
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding this @Devika9705



Proposed change
This PR updates a calendar discrepancy for India (Maharashtra subdivision) regarding the Holi holiday in 2026.
In Maharashtra, Holi is officially observed on March 3, 2026, as per the state government holiday calendar and NSE/BSE schedules. However, the current implementation follows the general national calculation, which may differ.
This change:
This ensures more accurate regional holiday representation without affecting other states.
Type of change
Checklist
make checklocally; all checks and tests passed.