-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
mypy confused by defaultdict(list) #815
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
Comments
What happens if you add |
|
Also, this is an issue on the |
Also happens on master. Here is a self-contained repro suitable for a unit test:
|
How hard would this be? The majority of uses of defaultdict that I see have one of the builtins |
I haven't look into this yet but my guess would be that I could fix this pretty quickly. |
One quick hack would be to just add another overload to
But this feels wrong -- it should just know that these types are callables of 0 arguments. |
If you decide to fix this in typeshed, also note that two of the overloads On Sun, Dec 13, 2015 at 8:49 PM, Jukka Lehtosalo [email protected]
--Guido van Rossum (python.org/~guido) |
I'll give this a try tomorrow or Tuesday. |
Source:
Error:
The text was updated successfully, but these errors were encountered: