Rhd ZddlZddlZddlZddlZddlZddlmZdZdZdZ d dZ d dZ y) N) constantsc\tj|}tj|r$|j}|j|j fSt |tjrt|jSt |tjrt|jSyN) inspectunwrap isfunction__code__ co_filenameco_firstlineno isinstance functoolspartial_get_function_sourcefunc partialmethod)rcodes -/usr/lib/python3.12/asyncio/format_helpers.pyrr s >>$ D$}}  $"5"566$ ))*#DII..$ //0#DII.. c\t||d}t|}|r|d|dd|dz }|S)Nz at r:r)_format_callbackr)rargs func_reprsources r_format_callback_sourcersB tT2I !$ 'F tF1I;aq {33 rcg}|r|jd|D|r&|jd|jDdjdj|S)zFormat function arguments and keyword arguments. Special case for a single parameter: ('hello',) is formatted as ('hello'). c3FK|]}tj|ywrreprlibrepr).0args r z*_format_args_and_kwargs..&s73W\\#&7s!c3VK|]!\}}|dtj|#yw)=Nr)r"kvs rr$z*_format_args_and_kwargs..(s(I$!Qs!GLLO,-Is')z({})z, )extenditemsformatjoin)rkwargsr*s r_format_args_and_kwargsr.sQ E  7$77  I&,,.II ==5) **rct|tjr;t|||z}t |j |j |j|St|dr|jr |j}n0t|dr|jr |j}n t|}|t||z }|r||z }|S)N __qualname____name__) r rrr.rrrkeywordshasattrr0r1r!)rrr-suffixrs rrr,s$ ))*(v6? 499dmmVLLt^$):):%% z "t}}MM J  (v66I V rc|tjj}|tj}t j jt j||d}|j|S)zlReplacement for traceback.extract_stack() that only does the necessary work for asyncio debug mode. F)limit lookup_lines) sys _getframef_backrDEBUG_STACK_DEPTH traceback StackSummaryextract walk_stackreverse)fr6stacks r extract_stackrC>sj y MMO " " }++  " " * *9+?+?+B168= + ?E MMO Lr))NN) rrr r8r<rDrrrr.rrCrrrFs0   +$r