No overload variant of "foo" matches argument type "int"
This error message is flat out incorrect as there is a variant that matches int but there is an unexpected parameter name.
from typing import overload
@overload
def foo(a: int) -> None: ...
@overload
def foo(a: str) -> None: ...
def foo(a: object) -> None: ...
def bar(a: int) -> None: ...
foo(b=1)
bar(b=1)
main.py:11: note: "bar" defined here
main.py:13: error: No overload variant of "foo" matches argument type "int" [call-overload]
main.py:13: note: Possible overload variants:
main.py:13: note: def foo(a: int) -> None
main.py:13: note: def foo(a: str) -> None
main.py:14: error: Unexpected keyword argument "b" for "bar" [call-arg]
Found 2 errors in 1 file (checked 1 source file)
playground link
Also
In that output, for what reason is there a random main.py:11: note: "bar" defined here? Should I raise that as a separate issue?
No overload variant of "foo" matches argument type "int"This error message is flat out incorrect as there is a variant that matches
intbut there is an unexpected parameter name.playground link
Also
In that output, for what reason is there a random
main.py:11: note: "bar" defined here? Should I raise that as a separate issue?