-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Behaviour of Type[Any] #3098
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've wondered myself about how |
I'm spelling out explicitly what should change: For a value |
Currently a
Type[Any]
is considered to have the same attributes asType[object]
. However, actually it probably has many attributes that could be used, especially when theAny
comes from a module without stubs. Consider the following example:Then running:
Which seems to go a bit against the idea of gradual typing and intention of
Any
.One possible solution is to consider that
Type[Any] == Any
, I think this actually would not miss anything that could be catched now, while reducing false positives.The text was updated successfully, but these errors were encountered: