Closed
Description
Bug Report
If you use a ParamSpec
to accept a callable and its arguments, and supply keyword args in a different order than they appear in the arguments, mypy reports an error:
https://mypy-play.net/?mypy=master&python=3.11&gist=56911342c8a4d3326da4cc1265f1a156
This didn't happen on the last release, and in fact didn't happen as recently as 5d909f1. It does seem to happen only for callable protocols and not for functions.
Actual Behavior
main.py:12: error: Argument 1 to "g" has incompatible type "A"; expected "Callable[[int, str], None]" [arg-type]
main.py:12: note: "A.__call__" has type "Callable[[Arg(str, 'x'), Arg(int, 'y')], None]"