-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Overload with Dict only checks overlap on keys #9451
Comments
It's not specific to I do not actually have a good theory as to why it happens, but I suspect there is a case where a type can be either a
|
Thanks for the response. If I change the 2nd overload to |
I suspect it's this code: https://github.com/python/mypy/blob/master/mypy/meet.py#L342. |
Using mypy 0.782, it looks like overlap is only checked on dictionary keys.
gives
error: Overloaded function signatures 1 and 2 overlap with incompatible return types
. I get the same error when usingMapping
instead of `Dict.The text was updated successfully, but these errors were encountered: