o ?Ogd @sdddlZddlZddlZddlZddlZddlmZddZddZdd Z dd d Z dd dZ dS)N) constantscCsVt|}t|r|j}|j|jfSt|tjrt |j St|tj r)t |j SdSN) inspectZunwrapZ isfunction__code__ co_filenameco_firstlineno isinstance functoolspartial_get_function_sourcefunc partialmethod)r coder=/opt/alt/python310/lib64/python3.10/asyncio/format_helpers.pyr s       r cCs8t||d}t|}|r|d|dd|d7}|S)Nz at r:r)_format_callbackr )r args func_reprsourcerrr_format_callback_sources rcCsHg}|r|dd|D|r|dd|Ddd|S)zFormat function arguments and keyword arguments. Special case for a single parameter: ('hello',) is formatted as ('hello'). css|]}t|VqdSrreprlibrepr).0argrrr &sz*_format_args_and_kwargs..css(|]\}}|dt|VqdS)=Nr)rkvrrrr(s&z({})z, )extenditemsformatjoin)rkwargsr"rrr_format_args_and_kwargss r&cCst|tjrt|||}t|j|j|j|St|dr#|j r#|j }nt|dr/|j r/|j }nt |}|t||7}|r@||7}|S)N __qualname____name__) r r r r&rr rkeywordshasattrr(r)r)r rr%suffixrrrrr,s rcCsD|dur tj}|durtj}tjjt||dd}| |S)zlReplacement for traceback.extract_stack() that only does the necessary work for asyncio debug mode. NF)limit lookup_lines) sys _getframef_backrZDEBUG_STACK_DEPTH traceback StackSummaryextract walk_stackreverse)fr-stackrrr extract_stack>s r9)r')NN) r rrr/r2r'rr rr&rr9rrrrs