from abc import abstractmethod
class Foo:
@abstractmethod
def foo():...
_ = Foo()
this was rejected upstream due to performance reasons: https://github.com/microsoft/pyright/issues/5026, so instead we could probably just report an error on usages of abstractmethod if the class does not extend ABC. this would need to be a new diagnostic rule for backwards compatibility reasons
Code sample in basedpyright playground
this was rejected upstream due to performance reasons: https://github.com/microsoft/pyright/issues/5026, so instead we could probably just report an error on usages of
abstractmethod
if the class does not extendABC
. this would need to be a new diagnostic rule for backwards compatibility reasons