pisces.models.core.base.BaseModel.get_active_hooks#
- classmethod BaseModel.get_active_hooks(names: bool = True) list[BaseHook] | list[str]#
Return all active hook classes mixed into the model.
A hook is considered active if the model class has not explicitly disabled it via a
__<HookClassName>_HOOK_ENABLED__ = Falseflag.- Parameters:
names (
bool, optional) – If True, return a list of hook names (via_<HookClassName>_NAMEif available, or fall back to class name). If False, return the hook class objects themselves. Defaults to True.- Returns:
List of active hook names or hook class objects.
- Return type: