-
-
Notifications
You must be signed in to change notification settings - Fork 544
Update l10n related documentation: detailed explain of language parameter behavior #2396
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
…lidayBase to better explain the language parameter based on the current code base
…lidayBase to better explain the language parameter based on the current code base
…lidays into fix-2225-issue
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughThis pull request updates documentation and adds a new author entry. The Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 300000ms (1)
🔇 Additional comments (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
|
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.
Please run checks/tests and make sure to include relevant changes only.
Thank you!
I have fixed the ruff format issue. Please check if there are any other issues. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2396 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 214 214
Lines 13527 13527
Branches 1928 1928
=========================================
Hits 13527 13527 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…able and removed the formatting changes in utils.py
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: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
holidays/holiday_base.py
(1 hunks)holidays/utils.py
(3 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
holidays/utils.py (1)
holidays/registry.py (2)
EntityLoader
(206-300)get_financial_codes
(282-288)
🪛 Ruff (0.8.2)
holidays/utils.py
417-417: No newline at end of file
Add trailing newline
(W292)
🔇 Additional comments (3)
holidays/utils.py (2)
73-94
: Great improvement to the language parameter documentation!The updated docstring provides clear, detailed information about how the language parameter works. The explanation of ISO codes, fallback behavior, and environment consistency considerations is very helpful for users.
254-273
: Good consistency in documentation between functions.The explanation for the language parameter in
financial_holidays
mirrors the one incountry_holidays
, which ensures consistent documentation throughout the codebase.holidays/holiday_base.py (1)
293-312
: Clear and consistent language parameter documentation.The updated documentation provides excellent guidance on the language parameter's expected format and behavior. It effectively explains:
- Valid language code formats (ISO 639-1 and combinations with ISO 3166-1)
- The fallback behavior based on the LANG environment variable
- Potential inconsistencies between different environments
- Best practices for ensuring consistent results
This matches the documentation in the utils.py file, providing a consistent experience across the codebase.
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.
LGTM.
|
Proposed change
Updating the documentation for the
language
parameter by updating the docstrings in the following locations:country_holidays
functionfinancial_holidays
function (located inholidays/utils.py
)HolidayBase
class (located inholidays/holiday_base.py
)The updates ensure that the purpose and usage of the
language
parameter are clearly explained.Issue Fixed
Fixes #2225
Type of change
holidays
functionality in general)Checklist
make check
, all checks and tests are green