Qf^^ ddlZddlZddlZddlZddlZddl m Z gdZ ddddddZ ddddddZdd d Zd Zd Zd ZGddZdZGddZeeeeeeeedhZdZdZ y)N)StringIO)pprintpformat isreadable isrecursivesaferepr PrettyPrinterppFTcompact sort_dictsunderscore_numbersc L t|||||||}|j|y)N)streamindentwidthdepthr r r)r r) objectrrrrr r rprinters -/opt/alt/python312/lib64/python3.12/pprint.pyrr0s.KfEJ-/G NN6cD t||||||j|S)N)rrrr r r)r r)rrrrr r rs rrr9s+F e5!(Z,> @@GPr)r c( t|g|d|i|y)Nr )r)rr argskwargss rr r @s& 6:D:Z:6:rcB tj|idddSNrr _safe_reprrs rrrDs#G ? % %fb$ :1 ==rcB tj|idddSNrrr s rrrHs#> ? % %fb$ :1 ==rcB tj|idddSNrrr s rrrLs#B ? % %fb$ :1 ==rc eZdZ dgZdZdZy) _safe_keyobjc||_yN)r))selfr)s r__init__z_safe_key.__init__\s rc" |j|jkS#t$rjtt|jt |jftt|jt |jfkcYSwxYwr+)r) TypeErrorstrtypeid)r,others r__lt__z_safe_key.__lt___sm ;88eii' ' ;dhh("TXX,7eii)2eii=9: ; ;sA0B BN)__name__ __module__ __qualname__ __slots__r-r4rrr(r(PsI;rr(c< t|dt|dfSr")r()ts r _safe_tupler<fs , QqT?IadO ++rceZdZd#dddddZdZdZdZd Zd Zd Z iZ d Z e e e j<d Zee ej j<dZee ej<dZee ej<dZee ej<ee ej<dZee ej<dZee ej<dZee ej<dZee ej@j<dZ!e!e ejDj<dZ#dZ$dZ%dZ&dZ'dZ(e(e ejRj<dZ*e*e ejVj<dZ,e,e ejZj<dZ.e.e ej^j<dZ0e0e ejbj<d Z2e2e ejfj<d!Z4e4e ejjj<d"Z6y)$r NFTr c4 t|}t|}|dkr td||dkr td|s td||_||_||_|||_nt j|_t||_ ||_ ||_ y)Nrzindent must be >= 0zdepth must be > 0zwidth must be != 0) int ValueError_depth_indent_per_level_width_stream_sysstdoutbool_compact _sort_dicts_underscore_numbers)r,rrrrr r rs rr-zPrettyPrinter.__init__ks 4VE  A:23 3  !01 112 2 !'  !DL;;DLW  %#5 rc|j<|j||jddid|jjdyy)Nr )rD_formatwriter,rs rrzPrettyPrinter.pprints= << # LLq!R ; LL  t $ $rcbt}|j||ddid|jSr) _StringIOrMgetvalue)r,rsios rrzPrettyPrinter.pformats+k VS!QA.||~rc0|j|idddSr%formatrOs rrzPrettyPrinter.isrecursives{{62q!,Q//rc@|j|idd\}}}|xr| SrrU)r,rsreadable recursives rrzPrettyPrinter.isreadables*!%VRA!>8Y) M)rc t|}||vr)|jt|d|_d|_y|j |||}|j |z |z } t|| kDr|jjt|jd} | d||<| |||||||dz||=ytj|rt|tsp|jj rZt#|jdrDd|jj$j&vr"d||<|j)||||||dz||=y|j|y)NTFr# __wrapped__ __create_fn__)r2rN _recursion _recursive _readable_reprrClen _dispatchgetr1__repr__ _dataclasses is_dataclass isinstance__dataclass_params__reprhasattrr\r7_pprint_dataclass) r,rrr allowancecontextlevelobjidrep max_widthps rrMzPrettyPrinter._formatsA6  G  LLF+ ,"DO"DN jj%0KK&(94 s8i ""4<#8#8$?A}!"$ 7EAINEN++F3 .--22&//=9!V__%@%@%M%MM!"&&vvvy'SX[\S\]EN Srcp|jj}|t|dzz }tj|Dcgc]1}|j s|j t||j f3} }|j|dz|j| ||||||jdycc}w)Nr#()) __class__r5rbrffieldsrjnamegetattrrN_format_namespace_items) r,rrrrmrnrocls_namefitemss rrlzPrettyPrinter._pprint_dataclasss##,,#h-!## c rc|jd|j|j||dz|dz|||jdy)Nz mappingproxy( r#rv)rNrMcopyrs r_pprint_mappingproxyz"PrettyPrinter._pprint_mappingproxyesA _% V[[]FFRKQe % Src8t|tjurd}n|jj}|t |dzz }|j j}|j|dz|j|||||||jdy)N namespacer#rurv) r1_typesSimpleNamespacerwr5rb__dict__r~rNr{) r,rrrrmrnror|r~s r_pprint_simplenamespacez%PrettyPrinter._pprint_simplenamespacems <611 1#H''00H#h-!##%%' X^$ $$UFFIwPUV Src J|j}||jz }dd|zz}t|dz } t|D]d\} \} } | | k(} |j | ||}|||d|j | ||t|zdz| r|nd||| r]||fy)N, rr#: r&)rNrBrbrrarM)r,r~rrrmrnrorNdelimnl last_indexrrentlastrqs rrz PrettyPrinter._format_dict_items|s $(((#,&Z!^ &u-MAzS ?D**S'51C #J $K LLffs3x&7!&;&* % )g.rc 2|j}dd|zz}t|dz } t|D]g\} \} } | | k(} || |dt| |vr |dn)|j | ||t| zdz| r|nd||| r`||iy)Nrrr#=...)rNrbrr2rM)r,r~rrrmrnrorNrrrrrrs rr{z%PrettyPrinter._format_namespace_itemss #,&Z!^ &u-MAzS ?D #J #J#w'!e  S&&3s8*;a*?*.YA$e-g.rcd|j}||jz }|jdkDr||jdz dzdd|zz}d} |j|z dzx} } t|} t | } d}|s| } t | } |j rI|j|||}t|dz}| |kr| } | r|} | |k\r| |z} || d} ||e|| |} |j||||r|nd|||syy#t $rYywxYw#t $rd}| |z} | |z} YwxYw) Nr#rrrFTr&, ) rNrBrCiternext StopIterationrHrarbrM)r,r~rrrmrnrorNrrrrritnext_entrrrqws rrzPrettyPrinter._format_itemssn $(((  ! !A % 4))A-4 5#,& KK&0144 %[ BxHC #8 }}jjgu5HqL19%E 'A:QJE%L E#J %LE LLff&* % )/   ! #Y& " #s$- D? D DDD/.D/c|j||j|j|\}}}|sd|_|rd|_|S)NFT)rVrrAr`r_)r,rrnrorjrYrZs rrazPrettyPrinter._reprsD$(KK 04 U%D!h "DN "DO rc, |j||||Sr+)r)r,rrn maxlevelsros rrVzPrettyPrinter.formats vw 5AArcxt|s|jt|y|j|j||}|j }|t|j dzz }|j|j d|dd|z|j||||dz|||jdy)Nr#rurrrv)rbrNrjradefault_factoryrwr5r) r,rrrrmrnrordfrs r_pprint_default_dictz"PrettyPrinter._pprint_default_dicts6{ LLf & jj//%@#cll#a'' S\\3f EF &&&)a-%P Srct|s|jt|y|j}|j|jdz|j dkDr!|j|j dz dz|j }|j|||t|jzdz|dz|||jdy)Nrr#rr&r)rbrNrjrwr5rB most_commonr) r,rrrrmrnrorr~s r_pprint_counterzPrettyPrinter._pprint_counters6{ LLf &  S\\D()  ! !A % LL$0014; <""$ v &S\\): :Q > A ' 0  Trc t|js|jt|y|j}|j|j dz|t|j dzz }t |jD]x\}} |t|jdz k(r+|j| |||dz|||jdL|j| ||d|||jdd|zzzy)Nrur#rvrr)rbmapsrNrjrwr5rrM) r,rrrrmrnrorrms r_pprint_chain_mapzPrettyPrinter._pprint_chain_maps6;; LLf &  S\\C'(#cll#a''fkk*DAqC $q(( Q A wN S! Q7EB US6\12 +rct|s|jt|y|j}|j|jdz|t|jdzz }|jd|j +|j ||||dz|||jdy|j |||d|||j|j ||}|jdd|zd|d y) Nrur#rr&z])z], rzmaxlen=rv)rbrNrjrwr5maxlenrra) r,rrrrmrnrorrmls r _pprint_dequezPrettyPrinter._pprint_deques6{ LLf &  S\\C'(#cll#a'' S ==   vvvy1}& / LL    vvvq& /**V]]GU;C LLsV|SA Brc J|j|j|||||dz yNr#rMdatars r_pprint_user_dictzPrettyPrinter._pprint_user_dict  V[[&&)WeaiPrc J|j|j|||||dz yrrrs r_pprint_user_listzPrettyPrinter._pprint_user_list rrc J|j|j|||||dz yrrrs r_pprint_user_stringz!PrettyPrinter._pprint_user_string%rrcjt|}|tvrt|ddfSt|dd}t |t r3|t j ur!|jr|dddfSt|ddfSt |tr |tj ur|syt|}|r ||k\rdd||vfS||vrt|ddfSd||<d}d} g} | j} |dz }|jr t|jt} n|j} | D]S\} }|j!| |||\}}}|j!||||\}}}| |d ||xr|xr|}|s|sRd} U||=d d j#| z|| fSt |t$r|t$j us"t |t&r|t&j urt |t$r|sy d }nt)|dk(rd}n|syd}t|}|r||k\r |dzd||vfS||vrt|ddfSd||<d}d} g} | j} |dz }|D]+}|j!||||\}}}| ||sd}|s*d} -||=|d j#| z|| fSt|}||xr|j+d dfS)NTFre_d)z{}TFz{...}r#rrz{%s}r)z[]TFz[%s]z(%s,))z()TFz(%s)r<)r1_builtin_scalarsrjrz issubclassr?rerJdictr2r^rrIrr~r<rVjoinrtuplerb startswith)r,rrnrrorrrprYrZ componentsrr~kvkrepr kreadablekrecurvrepr vreadablevrecurrVoorepr oreadableorecurrqs rrzPrettyPrinter._safe_repr*s6l " "<u, , CT * c3 A$5'' tU22F|T500 c4 Q$--%7(vJEUi/u'777!&)5$66GENHIJ&&F QJEv||~;? 1+/;;w 5,2(y&+/;;w 5,2(y&5%01#? ?iV $IDIIj118YF F sD !a4==&8 sE "qENN':#t$,V! ,vJEUi/~uew.>>>!&)5$66GENHIJ&&F QJE+/;;w 5,2(y&u  $H $IDIIj118YF F6lS4!44u<)r1r5r2r s rr^r^~sF|$$bj 23rc# Kd}t|dzdz}tdt|dD]D}|||dz}||z}||k(r||z}tt||kDr|r t||}C|}F|rt|yyw)Nrrr)rbrangerj)rrrmrrrrrs rrrsG v;! a D 1c&k1 %a1~dN 9 Y E tI % '7m#GG&7msBB)Nr#r N)r#r N)! collectionsr  dataclassesrfrsysrEtypesriorrQ__all__rrr rrrr(r<r r r0rr floatcomplexrGr1rr^rr9rrr"s4#" $ "TePduP"';>>>;;,,O=O=bc5)UG"DJ013 r