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
$ python -m mypy mypy_problem.py
mypy_problem.py:8: error: Too many arguments for "fn"
I expect this to not give an error because as far as I know it's valid python code - it works at least! A workaround is to wrap the whole thing in another dictionary, i.e.:
fn(**{**{'a': 10}, **{'b': 20, 'c': 30}})
But this is messy and possibly introduces an additional overhead.
Fixes#4708
Allows for multiple ambiguous **kwarg unpacking in a call -- all ambiguous **kwargs will map to all formal args that do not have a certain actual arg.
Fixes#9395
Defers ambiguous **kwarg mapping until all other unambiguous formal args have been mapped -- order of **kwarg unpacking no longer affects the arg map.
When I run the following code through MyPy:
I receive the following:
I expect this to not give an error because as far as I know it's valid python code - it works at least! A workaround is to wrap the whole thing in another dictionary, i.e.:
But this is messy and possibly introduces an additional overhead.
I'm using Windows 7 64-bit.
The text was updated successfully, but these errors were encountered: