I have the following python code in test.py
:
my_dict = {"a": 1, "b": 3}
for k,v in my_dict:
print(k)
print(v)
When I run pyright pytest.py
this is not flagged as an error, even though in my understanding there is enough information to know that my_dict.__iter__
returns Iterable[keys]
and the type checker must be able to infer that the tuple unpacking would fail