-
-
Notifications
You must be signed in to change notification settings - Fork 558
Refactor iCal exporter #2977
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
Refactor iCal exporter #2977
Conversation
Summary by CodeRabbit
WalkthroughRefactors holidays/ical.py to use a centralized _timedelta helper, adds its import, and precomputes the dates list length for reuse in loops. Updates continuity checks to call _timedelta instead of datetime.timedelta and replaces repeated len() calls with a stored variable. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-04-03T16:58:27.175Z
Applied to files:
🧬 Code graph analysis (1)holidays/ical.py (2)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (4)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Ruff (0.13.2)holidays/ical.py�[1;31mruff failed�[0m 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 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2977 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 301 301
Lines 17962 17964 +2
Branches 2319 2319
=========================================
+ Hits 17962 17964 +2 ☔ 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.
LGTM 👍
Good catch, not sure how we missed that during the initial PR review, but at least it's fixed now
Proposed change
Speed up date operations by using
_timedelta
instead ofdatetime.timedelta
.Type of change
holidays
functionality in general)Checklist
make check
locally; all checks and tests passed.