Dict .get
Type Checking
#1915
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Hey guys,
I reviewed my code and am pretty confident my typing implementation is correct. I have a dictionary with keys bound to type
str | int
and values bound to a generic type var_S
which is further bound to 3 python object models. I defined a getter for getting an element from the dictionary and typed the return as follows:However pylance yields the following error on the return line:
See the full code snippet at the bottom of the issue. Cheers.
Environment data
Expected behaviour
Should produce no error
Actual behaviour
yields the following error:
Logs
Code Snippet / Additional information
The text was updated successfully, but these errors were encountered: