-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Type variable in container of callable is not solved #1639
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Comments
Thanks for the bug report. This will be fixed in the next release. Interestingly, mypy reports errors in all three of these cases:
|
erictraut
added
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
labels
Mar 18, 2021
Huh, interesting, can you not type generic callbacks at all with mypy? |
This is now addressed in pyright 1.1.123, which I just published. It will also be included in the next release of pylance. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Describe the bug
When a type variable
T
is inside a container which is aCallable
parameter (a callback), which is itself a parameter of a function whose return type is the return type of theCallable
, an unsolved copy ofT
is left dangling in a union.To Reproduce
Type check the snippet below.
Expected behavior
That the type of
qux([1.], bar)
would befloat
.Screenshots or Code
VS Code extension or command-line
Either, 1.1.122 - used to work in versions prior to 1.1.122.
The text was updated successfully, but these errors were encountered: