Replies: 1 comment
-
This type checks without error in pyright. I recommend filing a bug in the mypy issue tracker. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have trouble understanding why mypy complains about
Callable[[T|None],TypeGuard[T]]
being incompatible withCallable[[int|None],TypeGuard[int]]
whenT
is aTypeVar
in this context. (The error happens in the last line)Here's the code in the mypy playground https://mypy-play.net/?mypy=latest&python=3.11&gist=59ff502958f7588377cdba0efd3044db
I'd be thankfull if someone helped me understand
mypy
's reasoningBeta Was this translation helpful? Give feedback.
All reactions