uBFj UddlZddlZddlmZddlmZmZdadZ ej dkre ddl m Z m Z ddl mZd Zn#e $rGd d Z YnwxYweZeZeZdZdZdZdZeeeegdfed <daejad ZdZeddZdddZdddZdZ dZ!dS)N)contextmanager)CallableOptionalFcdS)z Lazily init colorama if necessary, not to screw up stdout if debugging is not enabled. This version of the function does nothing. Nr8C:\PYTHON\_runtimes\venv\Lib\site-packages\jedi/debug.py_lazy_colorama_initr srnt)Foreinit) initialisectts.dt_ tdn#t$rYnwxYwdadS)z Lazily init colorama if necessary, not to screw up stdout is debug not enabled. This version of the function does init colorama. TF)stripN)_initedr atexit_doner Exceptionrrr r r s\ *. &u%%%%% DGGGs & 33c&eZdZdZdZdZdZdZdZdS)r N) __name__ __module__ __qualname__REDGREENYELLOWMAGENTARESETBLUErrr r r 1s,rr debug_functionc0tjadadS)Nr)time _start_time _debug_indentrrr reset_timer$Gs)++KMMMrcfd}|S)zDecorator for makin cdt5|i|cdddS#1swxYwYdSN)increase_indent_cm)argskwargsfuncs r wrapperz increase_indent..wrapperOs  ! ! ) )4((( ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )s %))r)r+r,s` r increase_indentr-Ms#))))) Nrrc#K|rtd|z|tdz a dVtdza|rtd|z|dSdS#tdza|rtd|z|wwxYw)NzStart: colorzEnd: )dbgr#)titler0s r r(r(Us , I U++++QM.   . %u - - - - - - . .   . %u - - - - - .s A #A/rr/c |sJtrQtrLdtz}tt||dz|t d|DzzdSdSdS)zB Looks at the stack, to see if a debug message should be printed.  zdbg: c34K|]}t|VdSr'repr.0as r zdbg..js(;R;RDGG;R;R;R;R;R;RrN)r enable_noticer#r tuple)messager0r)is r r2r2cs LL5T-T - ua'kGe;R;RT;R;R;R6R6R,RRSSSSSTTTTrT)formatctrGtrBdtz}|r|td|Dz}td|dz|zdSdSdS)Nr5c34K|]}t|VdSr'r7r9s r r<zwarning..qs(%<%)r?rAr)r@s r warningrEmsw9.9 -   =%<% $  C #-$* $%%%%%r)Nr)"osr! contextlibrtypingrrrr rH ImportErrorcoloramar r robjectNOTICEWARNINGSPEEDrGrDr=rstr__annotations__r#r"r$r-r(r2rErJrPrrr r\s %%%%%%%%%%%%%% % w$ ('''''''''''''    *  &((  8<3*d"234;;; dikk   . . . .&TTTTT$(99999VVV&&&&&s=AA