Skip to content

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented Jul 29, 2025

This made sense while doing the fixes for scientific-python/scientific-python.org#782, but also I separated it out as it may or may not be necessary.

@bsipocz bsipocz added the type: Bug fix Something isn't working label Jul 29, 2025
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.69%. Comparing base (b0176a1) to head (7454841).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- Coverage   95.41%   94.69%   -0.73%     
==========================================
  Files           1        1              
  Lines         109      113       +4     
==========================================
+ Hits          104      107       +3     
- Misses          5        6       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bsipocz bsipocz added this to the 0.3 milestone Sep 7, 2025

def event_from_yaml(event_yaml: dict, tz: datetime.tzinfo = None) -> ics.Event:
def event_from_yaml(
event_yaml: dict, tz: datetime.tzinfo = dateutil.tz.UTC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think either change the default, or change the handling below, but not both.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it makes most sense to change the default here, and then let the event timezone overwrite. Or it maybe cleaner to drop the tz kwarg altogether and rely only on the yaml and have a conditional?

    if "timezone" in d:
        tz = gettz(d.pop("timezone"))
    else:
        tz = dateutil.tz.UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: Bug fix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants