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

Add static method from_optional #20

Merged
merged 7 commits into from
Sep 2, 2024

Conversation

check69
Copy link
Collaborator

@check69 check69 commented Nov 23, 2023

Adding the functionality requested by rksouthee. issue #19

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2023

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fcace3a) to head (b8de692).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #20   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         1014      1029   +15     
=========================================
+ Hits          1014      1029   +15     

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



def test_from_optional():
assert Some(0) == OptionProtocol.from_optional(0)
Copy link
Owner

Choose a reason for hiding this comment

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

I think we should use the type alias Option instead of the protocol for this calls. They are a bad example 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

Updated to option_from function.

@danielSanchezQ danielSanchezQ merged commit 8a47e13 into danielSanchezQ:main Sep 2, 2024
6 checks passed
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.

4 participants