module disabled_method

Disable methods in child classes.

Usage:

class Foo:
    def hello(self) -> None:
        print("Hello")

    def msg(self, msg: str) -> None:
        print(msg)

    @staticmethod
    def foo_ness() -> None:
        print("Foo is me")


class Bar(Foo):
    msg = DisabledMethod()
    foo_ness = DisabledMethod()
class ooodev.meta.disabled_method.DisabledMethod[source]

Descriptor to raise an exception when a method is accessed when disabled.