Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
brainprep.decorators.Hook¶
- class brainprep.decorators.Hook[source]¶
Bases:
objectBase class for decorator hooks.
Hooks used with the decorator must inherit from this class and and optionally override
before_callandafter_callmethods. These methods act as hooks that run before and after the wrapped function is executed.By default, both methods implement pass-through behavior:
before_callreturns the inputs unchanged, andafter_callreturns the outputs unchanged.Notes
Subclasses may override one or both methods. If a method is not overridden, the default implementation simply returns its argument unchanged.