Overload is not reported as inconsistend when positional or keyword arguments are missing in implementation #7937
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
In this overload:
pyright reports no errors. But the first overload claims the function is callable as
f(a=1)
, which fails at runtime. If you make that overload's argument keyword only, pyright does report the implementation as missing the keyword parameter "a".I think the keyword or positional variant should also be reported since it leads to runtime errors that aren't caught. From what I understand it,
(a: str) -> int
should also be a supertype of(*, a: str) -> int
, so it seems strange that it raises fewer errors here.The text was updated successfully, but these errors were encountered: