-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
mypy reporting error with default value for typevar #8739
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
You get a similar failure on a simpler, more general case:
So it looks like this is a duplicate of #3737. As that thread mentions, a good workaround is using |
Ah geez, I did not see that. I'll try the solutions there and close this. Thanks! |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I’m struggling with a generic type var and have reduced it to a simple example. I’m trying to have a function that takes a generic type and returns an instance of that type
Am I missing something obvious or is this a bug? My understanding is that Type[B] should be a subset of Type[T] and not cause an incompatibility
I get a similar error with modifications such as
and
I made a thread on gitter and got no response 🤷
Versions
mypy 0.770
Python 3.8.2
The text was updated successfully, but these errors were encountered: