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
This is arguably a mypy bug: mypy doesn't recognize that f is a FunctionType (python/mypy#3171). However, that's not easily fixable. A good workaround would be to make dis.dis accept Callable[..., Any].
Env
Problem Details
Following code
MyPy will report
It seems MyPy does not parse it as
types.FunctionType
, I'm not sure it's a bug of MyPy or typeshed. I check the code ofdis.dis
(https://github.com/python/cpython/blob/9a3ffc0492d1310ead9ce8f5ee678c26b20a338d/Lib/dis.py#L34-L77), I think implementing aProtocol
is a workaround.The text was updated successfully, but these errors were encountered: