
    F\h
                     t    S SK r S SKrS SKrS SKrS SKrSSKJr  S rSS.S jrSS.S jr	SS	S
.S jr
SS jrg)    N   )	constantsc                 ~   [         R                  " U 5      n [         R                  " U 5      (       a$  U R                  nUR                  UR
                  4$ [        U [        R                  5      (       a  [        U R                  5      $ [        U [        R                  5      (       a  [        U R                  5      $ g N)inspectunwrap
isfunction__code__co_filenameco_firstlineno
isinstance	functoolspartial_get_function_sourcefuncpartialmethod)r   codes     -/usr/lib/python3.13/asyncio/format_helpers.pyr   r   
   s    >>$D$}}  $"5"566$	))**#DII..$	//00#DII..    Fdebugc                b    [        XS US9n[        U 5      nU(       a  USUS    SUS    3-  nU$ )Nr   z at r   :r   )_format_callbackr   )r   argsr   	func_reprsources        r   _format_callback_sourcer      sB     T?I!$'FtF1I;aq	{33	r   c                    U(       d  g/ nU (       a  UR                  S U  5       5        U(       a&  UR                  S UR                  5        5       5        SR                  SR                  U5      5      $ )a  Format function arguments and keyword arguments.

Special case for a single parameter: ('hello',) is formatted as ('hello').

Note that this function only returns argument details when
debug=True is specified, as arguments may contain sensitive
information.
z()c              3   N   #    U  H  n[         R                  " U5      v   M     g 7fr   reprlibrepr).0args     r   	<genexpr>*_format_args_and_kwargs.<locals>.<genexpr>-   s     7$3W\\#&&$s   #%c              3   \   #    U  H"  u  pU S [         R                  " U5       3v   M$     g7f)=Nr!   )r$   kvs      r   r&   r'   /   s&     I.$!s!GLLO,-.s   *,z({})z, )extenditemsformatjoin)r   kwargsr   r-   s       r   _format_args_and_kwargsr1      sY      E7$77I&,,.II==5)**r    r   suffixc                   [        U [        R                  5      (       a7  [        XUS9U-   n[	        U R
                  U R                  U R                  X4S9$ [        U S5      (       a  U R                  (       a  U R                  nO:[        U S5      (       a  U R                  (       a  U R                  nO[        U 5      nU[        XUS9-  nU(       a  XT-  nU$ )Nr   r3   __qualname____name__)r   r   r   r1   r   r   r   keywordshasattrr6   r7   r#   )r   r   r0   r   r4   r   s         r   r   r   3   s    $	))**(UCfL		499dmm&+< 	< t^$$):):%%		z	"	"t}}MM	J	(UCCI	r   c                     U c  [         R                  " 5       R                  n Uc  [        R                  n[
        R                  R                  [
        R                  " U 5      USS9nUR                  5         U$ )zdReplacement for traceback.extract_stack() that only does the
necessary work for asyncio debug mode.
F)limitlookup_lines)
sys	_getframef_backr   DEBUG_STACK_DEPTH	tracebackStackSummaryextract
walk_stackreverse)fr;   stacks      r   extract_stackrH   F   sj     	yMMO""} ++""**9+?+?+B168= + ?E 
MMOLr   )NN)r   r   r"   r=   rA   r2   r   r   r   r1   r   rH    r   r   <module>rJ      sA       
  	 27  49 +* 38 &r   