-
-
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
Objects matching SupportsKeysAndGetItem[str, Any]
cannot be used after **
#14986
Comments
Should be Line 2129 in c99133f
|
@hauntsaninja so that could simply be changed to |
There's a good chance the core of that change is that simple. Will need some effort in unit tests as well if you do it that way, since I don't think we currently have a |
@hauntsaninja Well, I gave it a shot. I figured out that there are a couple of other places that need to be changed: Lines 4933 to 4950 in 89469ac
Both of those need to be changed from However, I'm unable to get the unit tests to pick up a |
Might need to do something like |
@hauntsaninja I was able to fix some of the unit test issues by updating the |
Fixes #14986 This PR allows any object matching `_typeshed.SupportsKeysAndGetItem[str, Any]` to be unpacked with `**`.
Bug Report
Given the following code:
mypy
generates an error at line 19:Argument after ** must be a mapping, not "MyThing"
Expected Behavior
No error should be generated since it works at runtime. This has been discussed over in the Python Type School, and
pyright
has been updated to support this.Your Environment
mypy.ini
(and other config files): n/aThe text was updated successfully, but these errors were encountered: