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
main.py:28: error: Argument 1 to "a_func" has incompatible type "Callable[[Any, VarArg(Any)], Any]"; expected "Callable[[A, VarArg(Any), KwArg(Any)], Any]" [arg-type]
main.py:28: note: This is likely because "filter" has named arguments: "a". Consider marking them positional-only
Found 1 error in 1 file (checked 1 source file)
Your Environment
Mypy version used: mypy 1.7.0+dev.c0906408c10d24d748711fa24be5befb2c794d4c (compiled: no)
Python version used: 3.11.5
The text was updated successfully, but these errors were encountered:
Yeah, it is really bad when switching some precise type to Any results in an error, but here it is kind of expected. There is this thing called infer_against_any (or similar), and its idea is that when we have Any actual, we should infer some very forgiving type. The problem is that inferring Any for _P creates a type that is not forgiving at all (if there is a prefix, because plain *args: Any, **kwargs: Any are special-cased). I guess this issue will be fixed by #15913 in its original form (btw could you please check if you will have time).
I am still hesitating about what to do about that PR, and @JukkaL decided to ignore me there, so I guess I will need to make the hard choice myself.
Thanks for the reply! I did check #15913 with Home Assistant (where I also noticed this error). #15913 on it's own not fix it. However, I'm also not seeing any new regressions so should be fine from that POV.
BTW feel free to ping me if I should check a PR against the whole Home Assistant test suite. I've a branch setup to test it quite easily with all it's 1300+ requirements. Might sometimes be a good addition to the regular mypy primer result.
Bug Report
Notice this while testing the master branch. I bisected the regression to
/CC @ilevkivskyi
To Reproduce
https://mypy-play.net/?mypy=master&python=3.11&gist=b8554f05b565ff448d1a291b3dbc38c3
Expected Behavior
no error
Actual Behavior
Your Environment
mypy 1.7.0+dev.c0906408c10d24d748711fa24be5befb2c794d4c (compiled: no)
3.11.5
The text was updated successfully, but these errors were encountered: