K idZddlmZddlZddlZddlmZerddlmZmZddZ ejjfd dZ y) aEcho calls made to functions in a module. "Echoing" a function call means printing out the name of the function and the values of its arguments before making the call (which is more commonly referred to as "tracing", but Python already has a trace module). Alternatively, echo.echo can be used to decorate functions. Calls to the decorated function will be echoed. Example: ------- @echo.echo def my_function(args): pass ) annotationsN) TYPE_CHECKING)AnyCallablec|\}}|d|S)z2Return a string representing a (name, value) pair.=)arg_valargvals Y/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/watchdog/utils/echo.pyformat_arg_valuer$sHCU!C7 c j}|j|jdjxsd}t t t t| d|tjdfd }|S)zEcho calls to a function. Returns a decorated version of the input function which "echoes" calls made to it by writing out the function's name and the arguments it was called with. Nr c ttttt |} t |dDcgc]}||vst| |f}}ttt |d}tttt|j }||z|z|z} jddj|d |i|Scc}w)N(z, z) ) listmaprziplenrepritems__name__join) vk positionala defaultednamelesskeywordargsargcountargdefsargnamesfnwrites r wrappedzecho..wrapped8s#.S15E0FGH @HQ@Ra1VW_`V`%q'!*o6a aD!HI,/0s+T!'')_=>I%07:  Qtyy/s341{{ bs C"C")rrrrreturnr) __code__ co_argcount co_varnames __defaults__dictrrr functoolswraps)r&r'code fn_defaultsr(r#r$r%s`` @@@r echor3*s ;;DH *H oo3K4Hc+&6%6%89;GHIG__R    Nr)r ztuple[str, tuple[Any, ...]]r)str)r&rr'zCallable[[str], int | None]r)r) __doc__ __future__rr/systypingrrrrstdoutr'r3r rr r:s8$# $ =@JJ