*Memo:
- mypy test.py
- Python 3.14.0
- mypy 1.19.1
The different type (str) of unpacked inner list items from the type (int) of outer list items doesn't get error as shown below:
v = [0, 1, *['a', 'b']] # No error
The different type (str) of unpacked inner dictionary items from the type (int) of outer dictionary items gets the error as shown below:
v = {0: 1, **{'a':'b'}} # Error
error: Cannot infer value of type parameter "KT" of
In additioin, if the types of keys in an inter and outer dictionary are the same, error doesn't occur as shown below:
v1 = {0: 1, **{2:'b'}}
v2 = {'0': 1, **{'a':'b'}}
# No error