-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Errors when using defaultdict #995
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
This seems a symptom of a general problem where classes don't seen to be considered compatible with callables. I've found a few other instances of this too. |
Changing this to
|
Hmm, weird. In a standalone file I get an error about bar needing a type (which is equally strange). In the real example it's ignoring it's type. |
Hm, this works for me:
|
Ah this is a dupe of #815. |
Linking python#995 I could fix this 3.12 regression, I guess, but what's the point
defaultdict's documentation suggests passing
list
as an argument to defaultdict - https://docs.python.org/2/library/collections.html#defaultdict-examplesmypy complains when I do this however
Results in:
The text was updated successfully, but these errors were encountered: