-
-
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
dict.update() with keyword args is not supported #1031
Comments
Isn't this a bug in typeshed? |
Well, I tried to fix it with an overload in typeshed (see attached diff -- I also had to add the same overload to Counter) but it didn't really work. Using the overload with keyword args requires the key type to be a string (but there's no way to express that in the stub), and the actual example was passing two values of different types. This example still elicits an error for the update() but not for the dict() call:
I always get
Adding a type annotation ( |
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
We get little benefit from our mypy QA checks at the moment, because we skip imports. This patch is what's needed to make mypy succeed with imports on a single file: master.py It also updates mypy to the current version, and enables a QA check. Mypy bugs I encountered: dict.update with kwargs not supported: python/mypy#1031 property setters and getters must be adjacent: python/mypy#1465
This seems to work now. |
Example:
Error:
The work-around is pretty simple:
a.update(dict(foo=0))
.The text was updated successfully, but these errors were encountered: