Skip to content

Utils

framework3.utils.utils

method_is_overridden(cls, method_name)

Source code in framework3/utils/utils.py
4
5
6
7
8
9
def method_is_overridden(cls, method_name):
    method = getattr(cls, method_name)
    for base in inspect.getmro(cls)[1:]:  # Skip the class itself
        if hasattr(base, method_name):
            return method is not getattr(base, method_name)
    return False