tackle icon indicating copy to clipboard operation
tackle copied to clipboard

Hook Alias

Open robcxyz opened this issue 1 year ago • 0 comments

Hook Alias

Alias hooks so they can be called easier

Overview

Would be nice to be able to define aliases for a hook to make them easier to call. For instance the listdir hook could additionally be called with list_dir or dir_list:


from tackle import BaseHook





class ListDirHook(BaseHook):

    hook_name = 'listdir'



    class Config:

        alias = ['list_dir', 'dir_list']

robcxyz avatar Jan 01 '24 07:01 robcxyz