-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Dict constructor with unknown base class #1363
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
Looks like this was caused by 1423a54. I think the fix will be easy. |
OK, it's not as easy as I thought. :-( It is not finding any overloads because the arg (self) has a type that is derived from Any, but is not exactly Any. So the allowance for Any made in overload_arg_similarity() doesn't trigger. If I make the allowance more flexible by using
Maybe the right solution is just to make self's type equal to Any? @JukkaL any thoughts? |
Making self's type We could make anything derived from For example, this would be okay:
|
Consider the following:
When we run mypy with
--slient-imports
on only this file, we get the following error:The text was updated successfully, but these errors were encountered: