-
-
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
Regression for TypedDict default getattr #14481
Comments
|
cc @ilevkivskyi |
Woah, I didn't know you could use mypy-primer in this way! I'll try it on the other regression. Thanks! |
My PR just exposes existing issues (lack of proper union handling) like #13274. This is not easy to fix, since plugin for |
Fixes #14481 (regression) Fixes #13274 Fixes #8533 Most notably, if literal matches multiple items in union, it is not an error, it is only an error if it matches none of them, so I adjust the error message accordingly. An import caveat is that an unrelated error like `{"key": 42 + "no"}` can cause no item to match (an hence an extra error), but I think it is fine, since we still show the actual error, and avoiding this would require some dirty hacks. Also note there was an (obvious) bug in one of the fixtures, that caused one of repros not repro in tests, fixing it required tweaking an unrelated test.
This generates an error on latest error but not on mypy 0.991
The text was updated successfully, but these errors were encountered: