pyrser/parsing/base.py
def set_hooks(cls, hooks: dict) -> bool:
        """
        Merge internal hooks set with the given hooks
        """
        cls._hooks = cls._hooks.new_child()
        for hook_name, hook_pt in hooks.items():
            if '.' not in hook_name:
                hook_name = cls.__module__ \
                    + '.' + cls.__name__ \
                    + '.' + hook_name
            meta.set_one(cls._hooks, hook_name, hook_pt)
        return True
def set_hooks(cls, hooks: dict) -> bool:
        cls._hooks = cls._hooks.new_child()
        for hook_name, hook_pt in hooks.items():
            if '.' not in hook_name:
                hook_name = cls.__module__ \
                    + '.' + cls.__name__ \
                    + '.' + hook_name
            meta.set_one(cls._hooks, hook_name, hook_pt)
        return True
def set_hooks ( cls , hooks : dict ) -> bool : cls . _hooks = cls . _hooks . new_child ( ) for hook_name , hook_pt in hooks . items ( ) : if '.' not in hook_name : hook_name = cls . __module__ + '.' + cls . __name__ + '.' + hook_name meta . set_one ( cls . _hooks , hook_name , hook_pt ) return True
Merge internal hooks set with the given hooks
Merge internal hooks set with the given hooks