-
-
Notifications
You must be signed in to change notification settings - Fork 78
fix: use floating events if not tz is set #133
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
8b2e1fc to
f6d97ec
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #133 +/- ##
==========================================
+ Coverage 91.22% 91.82% +0.59%
==========================================
Files 4 4
Lines 376 379 +3
Branches 98 100 +2
==========================================
+ Hits 343 348 +5
+ Misses 14 13 -1
+ Partials 19 18 -1 ☔ View full report in Codecov by Sentry. |
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install poetry==1.1.11 | ||
| pip install poetry==1.8.3 |
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.
why: updated poetry
| # The RFC specifies that the TZID parameter must be specified for datetime or time | ||
| # Otherwise we set a default timezone (if only one is set with VTIMEZONE) or utc | ||
| event.floating = type(component.get("dtstart").dt) == date and utc_default | ||
| if not strict: |
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.
Why: allow backward compatibility
| found = [] | ||
|
|
||
| def add_if_not_exception(event): | ||
| def is_not_exception(date): |
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.
Why: less out of scope variable access
| if not event.recurrence_id and (event.uid, event.start) in [ | ||
| (f.uid, f.recurrence_id) for f in found | ||
| ]: | ||
| if not event.recurrence_id and ( |
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.
Why: black wanted it to reformat
c3d06fa to
fb1f99c
Compare
| self.assertEqual(evs[4].start, datetime(2022, 4, 29, 11, 0, 0, tzinfo=tz)) | ||
| # parsing stops at 2022-05-01 | ||
|
|
||
| def test_google_2024(self): |
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.
Why: google changed it's ics output and now includes timezones
What was done: