-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Version 0.780 does not recognize python internal types as typing.Type
anymore
#8992
Comments
This is intended, at runtime |
But the documentation says the following: The only legal parameters for Type are classes, Any, type variables, and unions of any of these types. For example:
Type[Any] is equivalent to Type which in turn is equivalent to type, which is the root of Python’s metaclass hierarchy. |
The same happens with
|
@hmvp You need to use |
@JukkaL That's not really satisfying isn't it? I would like to use something that expresses that the values in the mapping are type-like, not instances. Using mapping: Dict[str, ?] = {
"foo": "some string",
"baz": SomeClass(),
} |
Since upgrading from version 0.770 to 0.780 we saw issues, where types used during runtime were recognized as
object
and not astyping.Type
anymore.Are you reporting a bug, or opening a feature request?
Bug
Please insert below the code you are checking with mypy
Do you see the same issue after installing mypy from Git master?
The text was updated successfully, but these errors were encountered: