+
     [;i;  c                   sL    ^ RI t ^ RIHt ^ RIHt / t ! R R]4      tR tR t	R# )    N)
HOOKS_DIRS)load_sourcec                   s0   a  ] tR t^t o RtR tR tRtV tR# )HooksObserverz
Provides interface for calling user hooks

When initializing, loads all hooks located in HOOKS_DIRS. Then it can called
with application name as argument. Observer ensures calling all hooks defined for the application.
c                s    \        4        R # N)_register_hooks)selfs   &1/usr/lib/python3.14/site-packages/tracer/hooks.py__init__ZHooksObserver.__init__!   s        c                sj    V\         9  d   R # \         V,           Uu. uF	  q"! 4       NK  	   pR # u upi r   )_hooks)r   appfs   && r   __call__ZHooksObserver.__call__$   s(    	s113s   0 N)	Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s      r	   r   c                s   a  V 3R lpV# )a  
Decorator for tracer hooks.

Example::

        from tracer import hooks

        @hooks.match("foo")
        def hook_app():
            print("Hey, application foo was found")

.. note::
        You can match multiple applications by calling ``@hooks.match`` with list of them.

c                 s   < \        S4      \        8X  d   SMS. F3  pV\        9  d
   . \        V&   \        V,          P                  V 4       K5  	  V # r   )ZtypeZlistr
   Zappend)r   r   appss   & r   	decoratorZmatch.<locals>.decorator;   sI    $Z4'TdV3c	F3K	#;a 4 
(r	   r   )r   r   s   f r   matchr   +   s      	r	   c            
      s6   \          F|  p \        P                  ! V 4       F_  w  rpV FS  p\        P                  P	                  V4      ^ ,          p \        V\        P                  P                  W4      4       KU  	  Ka  	  K~  	  R#   \         d     Ko  i ; i)r    N)r   osZwalkZpathZsplitextr   ZjoinZ	Exception)Zhook_dirZrootZdirsZfilesZfnameZmodnames         r   r   r   D   sy     X778,d%uggu%a(G"'',,t34  -   s   )B		B	B	)
r   Ztracer.pathsr   Ztracer.resources.pycompr   r
   Zobjectr   r   r   r   r	   r   <module>r      s+   & 
 # /	F "2r	   