Skip to content
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

feat: make return value not optional in provider API functions #270

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

federicobond
Copy link
Member

This PR

Modifies the get_provider and get_provider_metadata return types to guarantee that they don't return a None value.

The default provider is initialized as a NoOpProvider at module loading time, so this simplifies the usage of the provider functions for clients.

Signed-off-by: Federico Bond <federicobond@gmail.com>
Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1282bab) 94.02% compared to head (8329e89) 94.41%.

❗ Current head 8329e89 differs from pull request most recent head c76bc8a. Consider uploading reports for the commit c76bc8a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #270      +/-   ##
==========================================
+ Coverage   94.02%   94.41%   +0.39%     
==========================================
  Files          17       17              
  Lines         452      448       -4     
==========================================
- Hits          425      423       -2     
+ Misses         27       25       -2     
Flag Coverage Δ
unittests 94.41% <100.00%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@federicobond federicobond mentioned this pull request Feb 3, 2024
2 tasks
@federicobond federicobond merged commit cb1677b into open-feature:main Feb 6, 2024
10 checks passed
@federicobond federicobond deleted the provider-not-optional branch February 6, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants