Skip to content

Add conversion to bool for Maybe #2178

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

InAnYan
Copy link

@InAnYan InAnYan commented Jun 25, 2025

I have made things!

  1. Add __bool__ methods to Maybe (unfilled), Something and _Nothing.
  2. Add a new test file for that conversion.

Checklist

  • I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
  • I have created at least one test case for the changes I have made
  • I have updated the documentation for the changes I have made
  • I have added my changes to the CHANGELOG.md

Related issues

Closes #2177.

@InAnYan
Copy link
Author

InAnYan commented Jun 25, 2025

Hope I wrote code according to your conventions.

But I'm not sure:

  1. I think it's not necessary to add this to CHANGELOG.md, as this PR is quite small.
  2. I'm not sure about the docs -- what would be the best place to explain this? Or maybe skip this too

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link

codecov bot commented Jun 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (82ef3ef) to head (30aa760).
Report is 360 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #2178    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           80        81     +1     
  Lines         2485      2581    +96     
  Branches       437        44   -393     
==========================================
+ Hits          2485      2581    +96     

☔ 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.

InAnYan and others added 5 commits June 26, 2025 23:32
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: sobolevn <mail@sobolevn.me>
@InAnYan InAnYan marked this pull request as ready for review June 26, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: add bool conversion to Maybe
2 participants