diff --git a/realms/lib/hook.py b/realms/lib/hook.py index f4e012a..0327263 100644 --- a/realms/lib/hook.py +++ b/realms/lib/hook.py @@ -27,6 +27,9 @@ class HookMixinMeta(type): hookable = [] for key, value in attrs.items(): + # Disallow hooking methods which start with an underscore (allow __init__ etc. still) + if key.startswith('_') and not key.startswith('__'): + continue if callable(value): attrs[key] = hook_func(key, value) hookable.append(key)