Rather confusing error message when argument name is wrong #9668
Labels
bug
mypy got something wrong
topic-calls
Function calls, *args, **kwargs, defaults
topic-error-reporting
How we report errors
topic-protocols
topic-usability
Bug Report
If you run Mypy on this code:
You get this error:
main.py:34: error: Argument 1 has incompatible type "Callable[[Application, IRequest], Union[Union[str, bytes], Awaitable[Union[str, bytes]]]]"; expected "KleinRoute[Application]"
Using
mypy 0.790
onPython 3.9
.If you change the
resource
argument toroute
(second to last line), this passes. The above error suggests a different problem entirely, so it had us chasing our tails a bit.The text was updated successfully, but these errors were encountered: