-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Incompatible dictionary results in confusing error message #1183
Comments
Ok, this has to do with |
Ok, so this is what I have in mind: Test if we are dealing with a List[Tuple[Any, Any]] and if so add Additionally, also add the expected type. |
Ok, a fix/imrpovement is ready; It should now read:
Could you tell me if this is clearer @JukkaL ? |
Fixed by #3100. |
Dictionary literals with incompatible keys/values result in weird error message, because mypy translate the expression internally to something quite different before type checking.
This gives a confusing error message:
The text was updated successfully, but these errors were encountered: