Open NeilGirdhar opened 2 years ago
Pyright won't fix the first problem, so I can just ignore it. But is the second problem fixable? The decorator changes the class method into an ordinary method, so why is x.f()
passing the type?
This would be solved by https://github.com/python/typing/issues/1372
At the point at which the decorator is applied, the class method isn't a callable yet. It's a classmethod object that replies to
__get__
to produce the bound method. Yet, MyPy already thinks it's a callable: