Skip to content

Fix overridden method of Some returning Any - #2559

Merged
sobolevn merged 2 commits into
dry-python:masterfrom
jorenham:typing/fix-maybe
Oct 27, 2026
Merged

sobolevn merged 2 commits into
dry-python:masterfrom
jorenham:typing/fix-maybe

Conversation

@jorenham

@jorenham jorenham commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

I have made fixed indented things!

Several overridden methods in maybe.Some (and maybe._Nothing) were outside the if not TYPE_CHECKING block. But because they're unannotated, mypy inferred their return types as Any. This fixes it by me theatrically pressing tab on the selection of these methods (plus a -> Never and another if not TYPE_CHECKING block).

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

I checked, but found no related issues.


🙏 Please, if you or your company finds dry-python valuable, help us sustain the project by sponsoring it transparently on https://github.com/sponsors/dry-python. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@codspeed

codspeed Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 22 untouched benchmarks


Comparing jorenham:typing/fix-maybe (5df4707) with master (7c665c7)

Open in CodSpeed

@sobolevn
sobolevn merged commit ab93a36 into dry-python:master Oct 27, 2026
25 checks passed
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (82ef3ef) to head (5df4707).
⚠️ Report is 653 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #2559    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           80        82     +2     
  Lines         2485      2693   +208     
  Branches       437        45   -392     
==========================================
+ Hits          2485      2693   +208     

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants