You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, these are (known) bugs. I'm not sure if there is another issue created for this.
I believe that this only affects List, Dict and Set because they are special cased as aliases to list, dict and set, respectively. Mypy should not consider List and list interchangeable, as it currently does. However, list should still remain a valid type and be equivalent to List[Any].
MyPy does not show an error for the following code:
However, this code is not actually valid: it throws the following error at runtime:
The first step to fixing this code is to change
set
toSet
andlist
toList
. This, however, leads to another runtime error:Finally, we need to add the following imports:
and the program finally runs without an error.
So there are two issues here:
The text was updated successfully, but these errors were encountered: