-
-
Notifications
You must be signed in to change notification settings - Fork 3k
dict incorrectly being detected as "object" #1786
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
I'd add a type annotation to the LOGGING variable, something like Do note that mypy currently doesn't support different (fixed) keys of a dict having different types -- that's probably what's biting you. That and the empty dicts. |
The type annotation addresses the warning I got. FYI I got another warning after adding the type annotation. Not sure if it's a known problem or not but adding it here in case it's helpful. Here is the updated input:
Warning:
|
It looks like your |
Yes you're right. When I update the type annotation accordingly it fixes the problem |
I narrowed down the problem to this repro case:
When I run mypy 0.4.2 on this file (named test.py) I get this error:
Thanks for your help!
The text was updated successfully, but these errors were encountered: