Returning optional union from method complains about got "object"
#12823
Labels
bug
mypy got something wrong
topic-join-v-union
Using join vs. using unions
topic-type-context
Type context / bidirectional inference
Bug Report
Mypy thinks my method returns "object" which is not right.
To Reproduce
Run Mypy on this file:
Expected Behavior
This should have no errors.
Actual Behavior
It yields:
Your Environment
The text was updated successfully, but these errors were encountered: