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
The general reason that mypy doesn't catch this is that type checking is local to individual functions, and there's no obvious type error in either function taken by itself.
The problem you're pointing out is real, but unfortunately there doesn't appear to be a simple solution. python/typing#270 has a concrete proposal that would cover your use case, so closing this issue in favor of the typing one.
Given the following code:
Running
mypy --strict
yields no warnings. There's an obvious runtime error though:Using a "proxy function" that takes
*args, **kwargs
is a pretty common pattern in real-world code, so this seems like something mypy should support.The text was updated successfully, but these errors were encountered: