TL i nUddlZddlZddlmZddlmZmZdadZ ejdk(re ddl m Z m Z ddl mZd Z eZeZeZdZdZdZdZeeeegdfed <daejad ZdZeddZdddZdddZdZ dZ!y#e $r Gd d Z YrwxYw)N)contextmanager)CallableOptionalFcy)z Lazily init colorama if necessary, not to screw up stdout if debugging is not enabled. This version of the function does nothing. NrP/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/jedi/debug.py_lazy_colorama_initr srnt)Foreinit) initialisecltsdt_ tddayday#t$rYdaywxYw)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 sD*. &u% GdG !G s % 33c$eZdZdZdZdZdZdZdZy)r N) __name__ __module__ __qualname__REDGREENYELLOWMAGENTARESETBLUErrr r r 1s rr debug_functionc0tjaday)Nr)time _start_time _debug_indentrrr reset_timer$Gs))+KMrcfd}|S)zDecorator for makin cTt5|i|cdddS#1swYyxYwN)increase_indent_cm)argskwargsfuncs r wrapperz increase_indent..wrapperOs+  ! )(( ) ) )s'r)r+r,s` r increase_indentr-Ms) Nrc#K|rtd|z|tdz a dtdza|rtd|z|yy#tdza|rtd|z|wwxYww)NzStart: colorzEnd: )dbgr#)titler0s r r(r(Uso  I U+QM.   %u -    %u - sA!AA!AA!rr/c |sJtr@tr9dtz}tt||dz|t d|Dzzyyy)zB Looks at the stack, to see if a debug message should be printed.  zdbg: c32K|]}t|ywr'repr.0as r zdbg..js;RDG;RN)r enable_noticer#r tuple)messager0r)is r r2r2csH L5- - ua'kGe;RT;R6R,RRS(~rT)formatctr:tr3dtz}|r|td|Dz}td|dz|zyyy)Nr5c32K|]}t|ywr'r7r9s r r<zwarning..qs%rstr__annotations__r#r"r$r-r(r2rFrKrQrrr r]s %% % ww$ (' <  (  8<3*d"234; diik   . .&T$(9V&Ys"B""B43B4