Qf ddlZddlZddlddlmZmZddlmZmZm Z dOddddZ dZ dPdd d Z d Z d ZdQdZdZdZdRdZej&dZdSdZdZdddZdZGddeZGddeZdZdZeeds(dZ d Z!d!Z"d"Z#e$e e!e_%e$e"e#e_&Gd#d$e'Z(d%Z)Gd&d'ee((Z*Gd)d*ee((Z+Gd+d,ee((Z,Gd-d.ee((Z-Gd/d0ee((Z.e.Z/e*e0e1e2fe+e3fe,e4fe-e'de5fe.e'd1fiZ6e*e5fiZ7e5d.e'dd.e0d'e1d'e2d'e3d*e4d,e'd1d0iZ8Gd2d3e9Z:Gd4d5e:Z;Gd6d7e:Z<ee=d8sd9Z>d:Z?e$e>e?e=_@Gd;deCZDGd?d@eCZEGdAdBeCZFdCeGejjd zzZJe eGdDdEZKdFZLdGZMgeLeMZNGdHdIeZOdJZPdKDcic]}|eQj|c}ZSdLZTdMZUeVdNk(reUyycc}w)TN)*)contextmanager nullcontext)IntEnumauto _simple_enumF) type_commentsfeature_versionc t}|r |tz}|d}n*t|tr|\}}|dk7rt d||}t |||||S)NzUnsupported major version: )_feature_version) PyCF_ONLY_ASTPyCF_TYPE_COMMENTS isinstancetuple ValueErrorcompile)sourcefilenamemoder r flagsmajorminors */opt/alt/python312/lib64/python3.12/ast.pyparser"sq E ## OU +& u A::5'BC C 68T5$3 55c t|trt|jdd}t|tr |j }dfdfdfd|S)Nz evalrcVd}t|ddx}r|d|z }t|d|z)Nzmalformed node or stringlinenoz on line : )getattrr)nodemsglnos r_raise_malformed_nodez+literal_eval.._raise_malformed_nodeEsB($$/ /3 / Yse$ $CD8},--rct|tr&t|jtt t fvr||jSN)rConstanttypevalueintfloatcomplex)r%r(s r _convert_numz"literal_eval.._convert_numJs7$)T$**-=c5RYEZ-Z !$ 'zzrct|trRt|jttfr2|j }t|jtr|S| S|Sr*)rUnaryOpopUAddUSuboperand)r%r7r1s r_convert_signed_numz)literal_eval.._convert_signed_numNsU dG $DGGdD\)J"4<<0G$''4( y  y D!!rc |t|tr |jSt|trt t |j St|trtt |j St|trtt |j St|tr]t|jtrC|jjdk(r*|j|j cxk(rgk(r tSt|t"rpt%|j&t%|j(k7r|t+t-t |j&t |j(St|t.rt|j0t2t4frn|j6}|j8}t|t:t<fr4t|t>r$t|j0t2r||zS||z S|S)Nset) rr+r-TuplermapeltsListlistSetr:CallfuncNameidargskeywordsDictlenkeysvaluesdictzipBinOpr4AddSubleftrightr.r/r0)r%rPrQ_convertr1r8r(s rrRzliteral_eval.._convertVs dH %::  e $Xtyy12 2 d #Hdii01 1 c "s8TYY/0 0t$DIIt)Diille# T]](Hb(H5L)I d #499~T[[!11%d+C$))4$++689 9 e $DGGc3Z)H&tyy1D ,E$e -*UG2Ldggs+%<'%<'"4((r)rstrrlstrip Expressionbody)node_or_stringrRr1r8r(s @@@@r literal_evalrX8sa.#&~44U;&I.*-',,. ")4 N ##r)indentc dfd t|ts"td|jjztt sdz|dS)Nrcdz dzz}dzz}nd}d}t|trNt|}g}d} }|jD]]} t ||} | t ||dd}" | \} } |xr| }|r|j |d| M|j | _ rb|jrV|jD]G} t ||} | t ||d  | \} } |xr| }|j |d| I|rz(dump.._format..s/Sd50A!0Dds])rASTr,_fieldsr$AttributeErrorappend _attributesrH __class____name__joinr?repr)r%rjprefixsepclsrE allsimplerFnamer-simpleriannotate_fieldsinclude_attributesrYs ` rrizdump.._formats    QJEFUN*F&5.(CFC dC t*CDI&H #D$/E=WS$%<%D#H 'u 5 v%0& KK4 78KK&%"d&6&6 ,,D! 'd 3}dC)@)H $+E5$9ME6 ) 4fIKK4 78-SY!^#'>>#:#:DIIdOLRVhVV!%!8!8&#((4.QSXX X d #!%sxx/Sd/S'STV[[ [Dz4=&#H *! !s$ G G GG G G zexpected AST, got %r )r)rrm TypeErrorrrrsrS)r%r|r}rYris ```@rdumprssa . . ` dC .1H1HHII *VS"9v 4= rc dD][}||jvs||jvs!t||d}|t||s=|jdsOt |||]|S)N)r" col_offset end_linenoend_col_offsetend_)rqr$hasattr startswithsetattr)new_nodeold_nodeattrr-s r copy_locationrsnG 8'' 'DH4H4H,HHdD1E $'DOOF,C$.G Orc, fd|dddd|S)Ncd|jvr t|ds||_n |j}d|jvr!t|dd||_n |j}d|jvr t|ds||_n |j }d|jvr!t|dd||_n |j }t|D]}|||||y)Nr"rrr)rqrr"r$rrriter_child_nodes)r%r"rrrchild_fixs rrz#fix_missing_locations.._fixs t'' '4*$  4++ +t\408",!__ 4++ +4.",!__ t// /t-t4<&4#!%!4!4%d+E  J G,rr\rrf)r%rs @rfix_missing_locationsrs%H. q!Q Krr\c  t|D]t}t|trt|dd|z|_)d|j vrt|dd|z|_d|j vs[t|ddx}k||z|_v|S)Nr"rr)walkr TypeIgnorer$r"rqr)r%nrrs rincrement_linenors d eZ ("5(A6:EL  u(( ("5(A6:EL E-- -&ulA>>K)A~E  Krc#pK |jD]} |t||fy#t$rY"wxYwwr*)rnr$ro)r%fields r iter_fieldsrsE u-- -   s6'6 3636c#K t|D]G\}}t|tr|t|ts,|D]}t|ts|Iywr*)rrrmr?)r%rzritems rrr sR#4( e eS !K t $dC(J )s8AA Ac t|ttttfs"t d|j jz|jrt|jdtsy|jdj}t|tr't|jtr |j}ny|rddl }|j|}|S)Nz%r can't have docstringsr)rAsyncFunctionDef FunctionDefClassDefModulerrrrsrVExprr-r+rSinspectcleandoc)r%cleantextrs r get_docstringrs d-{HfM N2T^^5L5LLMM 99DIIaL$7 99Q<  D$!jS&Azz % Krz(.*?(?:\r\n|\n|\r|$))c g}ttj|dD]#\}}|||kDr|S|j|d%|SNr\r) enumerate _line_patternfinditerrp)rmaxlineslinesr"matchs r_splitlines_no_ffr4s] E"=#9#9&#A1E   FX$5  L  U1XF Lrc8 d}|D]}|dvr||z } |dz }|S)Nr^z r~rf)rresultcs r_pad_whitespacerAs4A F  ; aKF cMF  Mr)paddedc |j |jy|jdz }|jdz }|j}|j}t ||dz}||k(r$||j ||jS|r.t||j d|j}nd}|||j |djz} ||j d|j} ||dz|}|jd| |j| dj|S#t$rYywxYw)Nr\)rr^r) rrr"rrorencodedecoderinsertrprt) rr%rr"rrrrpaddingfirstlasts rget_source_segmentrLsU ?? "d&9&9&Aq__q( __ ,, fz!| % sE6E EEc#K ddlm}||g}|r2|j}|jt |||r1yyw)Nr)deque) collectionsrpopleftextendr)r%rtodos rrrqsE " $=D ||~ $T*+  s AAAc eZdZ dZdZdZy) NodeVisitorct d|jjz}t|||j}||S)Nvisit_)rrrsr$ generic_visit)selfr%methodvisitors rvisitzNodeVisitor.visits7DNN333$(:(:;t}rc t|D]a\}}t|tr*|D]$}t|ts|j |&@t|tsQ|j |cyr*)rrr?rmr)rr%rr-rs rrzNodeVisitor.generic_visitsZG'-LE5%&!D!$, 4("E3' 5! .rcf|j}tjt|}|,tj D]\}}t ||s|}n|8d|z} t ||}ddl}|j|dtd||S|j|S#t$rYwxYw)Nrrz" is deprecated; add visit_Constant) r-_const_node_type_namesgetr,itemsrr$warningswarnDeprecationWarningror) rr%r- type_namerxrzrrrs rvisit_ConstantzNodeVisitor.visit_Constants *..tE{;  399; TeS) $I<   )F %!$/  (JK0!5t}$!!$''"  s! B$$ B0/B0N)rs __module__ __qualname__rrrrfrrrrs& "(rrceZdZ dZy)NodeTransformerct|D]\}}t|trfg}|D]Y}t|tr6|j |}|'t|ts|j |I|j |[||dd|t|ts|j |}| t||t||||Sr*) rrr?rmrrrpdelattrr)rr%r old_value new_valuesr-rs rrzNodeTransformer.generic_visits +D 1 E9)T* &E!%- $ 5 1 =$!+E3!7&--e4$%%e,' * ! Is+::i0#D%(D%2%!2& rN)rsrrrrfrrrrs !FrrzN{name} is deprecated and will be removed in Python {remove}; use value insteadzU{name} is deprecated and will be removed in Python {remove}; use ast.Constant insteadrcT ddl}|jdtd|jSNrz Attribute nr messageremover _deprecated_DEPRECATED_VALUE_ALIAS_MESSAGEr-rrs r _n_getterr/, #B7  zzrcJddl}|jdtd||_yrrrr-rs r _n_setterr ) #B7   rcT ddl}|jdtd|jSNrz Attribute srrrrs r _s_getterrrrcJddl}|jdtd||_yrrrs r _s_setterrrrceZdZdZdZy)_ABCcd|_y)Nz3Deprecated AST node class. Use ast.Constant instead)__doc__)rxrEs r__init__z _ABC.__init__%s O rcf|tvr)ddl}|jd|jtdt |t sy|tvrC |j}t |t|xr!t |tj|d Stj||S#t$rYywxYw)Nrast.rrFrf) _const_typesrrr_DEPRECATED_CLASS_MESSAGErr+r-_const_types_notrror,__instancecheck__)rxinstrr-s rrz_ABC.__instancecheck__(s ,    s''()1 !  $) ,    ul3&78I"5*:*>*>sB*GHH%%c400"  s B$$ B0/B0N)rsrrrrrfrrrr#s P1rrc^|D]T}||jvr|jj|}|t|kss ckk ! kk$ T?s||n,NsgVW W  l3##$ %/HQX  (((   C 1$ 1& 11rceZdZdZeZy)Num)rNrsrrrnrrrfrrr r N GGrr ) metaclassceZdZdZeZy)StrsNr rfrrrrRr rrceZdZdZeZy)BytesrNr rfrrrrVr rrceZdZeZy) NameConstantN)rsrrrrrfrrrrZsGrrceZdZdZdZy)Ellipsisrfc|tur+ddl}|jdtdt dg|i|St j |g|i|S)Nrz ast.Ellipsisrr.) _ast_Ellipsisrrrr+r)rxrErrs rrzEllipsis.__new__`sZ -    (A' ! C1$1&1 15d5f55rN)rsrrrnrrfrrrr]s G6rr.c eZdZy)sliceNrsrrrfrrrrs$rrceZdZ dZy)Indexc |Sr*rf)rxr-rs rrz Index.__new__s rNrsrrrrfrrrrs JrrceZdZ ddZy)ExtSlicec >tt|tfi|Sr*)r;r?Load)rxdimsrs rrzExtSlice.__new__sT$Z2622rN)rfr rfrrr"r"s ;3rr"r%c |jSr*r=rs r _dims_getterr)s+yyrc||_yr*r'rr-s r _dims_setterr,s  rc eZdZy)SuiteNrrfrrr.r.9rr.c eZdZy)AugLoadNrrfrrr1r1r/rr1c eZdZy)AugStoreNrrfrrr3r3r/rr3c eZdZy)ParamNrrfrrr5r5r/rr51eceZdZ eZeZeZeZeZeZ eZ eZ eZ e Z eZeZeZeZeZeZeZeZeZdZy) _PrecedencecN |j|dzS#t$r|cYSwxYwNr\)rrrr(s rnextz_Precedence.nexts. >>$(+ + K s  $$N)rsrrr NAMED_EXPRTUPLEYIELDTESTORANDNOTCMPEXPRBORBXORBANDSHIFTARITHTERMFACTORPOWERAWAITATOMr;rfrrr8r8s?J FE FE 6D B &C &C &C 6D C 6D 6D FE FE 6D VF FE FE 6Drr8)'")z"""'''ceZdZ dddZdZdZdZddZdZe dd Z e d d d Z e d Z dZ dZdZdZdZdZfdZdZdZdZdZdZdZdZdZdZdZdZd Zd!Z d"Z!d#Z"d$Z#d%Z$d&Z%d'Z&d(Z'd)Z(d*Z)d+Z*d,Z+d-Z,d.Z-d/Z.d0Z/d1Z0d2Z1d3Z2d4Z3d5Z4d6Z5d7Z6d8Z7d9Z8d:Z9d;Z:d<Z;d=ZZ=d?Z>e?dd@dAZ@e?dBdCZAdDZBddEZCdFZDdGZEdHZFdIZGdJZHdKZIdLZJdMZKdNZLdOZMdPZNdQZOdRZPdSZQdTZRdUdVdWdXdYZSeTjeTjeTjeTjdZZWd[ZXdWdXd\d]d^d_d`dadbdcdddedfdg ZYeTjeTjeTjeTjeTjeTjeTjeTjeTjeTjeTjeTjeTjdh ZaebdiZcdjZddkdldmdndodpdqdrdsdtdu ZedvZfdwdxdyZgeTjeTjdzZjd{Zkd|Zld}Zmd~ZndZodZpdZqdZrdZsdZtdZudZvdZwdZxdZydZzdZ{dZ|dZ}dZ~dZdZdZxZS) _UnparserF)_avoid_backslashescXg|_i|_i|_d|_||_d|_y)NrF)_source _precedences _type_ignores_indentrT _in_try_star)rrTs rrz_Unparser.__init__s0  "4!rc t|} |t||D]}|||y#t$rYywxYwr*)iterr; StopIteration)rinterfseqrhs r interleavez_Unparser.interleavesJE3i  d3iL!   s6 AAc t|dk(r||djdyjfd||y)Nr\r,c&jdSNr_writer(srz&_Unparser.items_view..DJJt$4r)rHrgra)r traverserrs` r items_viewz_Unparser.items_views=  u:? eAh  JJsO OO4i GrcB |jr|jdyy)Nr])rVrgr(s r maybe_newlinez_Unparser.maybe_newlinesF << JJt  rch |j|jd|jz|zy)Nz )rmrgrYrrs rfillz_Unparser.fills-   6DLL(4/0rc< |jj|yr*)rVrros rrgz_Unparser.writes" D!rNc#PK|g}|j}||_|||_ywr*)rV)rbufferoriginal_sources rbufferedz_Unparser.buffereds, >F,,  & s$&extrac#K |jd|r|j||xjdz c_d|xjdzc_yw)N:r\)rgrY)rrws rblockz_Unparser.blocksF 3  JJu      sAAc#ZK |j|d|j|ywr*rf)rstartends rdelimitz_Unparser.delimits( G 5  3s)+c>|r|j||StSr*)r~r)rr|r} conditions r delimit_ifz_Unparser.delimit_if's <<s+ += rcN |jdd|j||kDSNrarb)rget_precedence)r precedencer%s rrequire_parensz_Unparser.require_parens-s(:sC)<).p 4(r -> )r~rarargtypesrgreturnsrs` rvisit_FunctionTypez_Unparser.visit_FunctionTypemsX \\#s # OO($-- $ 6 dll# $ #s +A44A=c|j|jtj|j|j |jyr*)rprr8r>r-rrs r visit_Exprz_Unparser.visit_Exprvs5  K--tzz: djj!rcf|jtj|5|jtj|j |j |j|j |jd|j|j dddy#1swYyxYw)Nz := ) rr8r<rrNtargetr-rrgrs rvisit_NamedExprz_Unparser.visit_NamedExpr{sp  !7!7 >    0 0$++tzz J MM$++ & JJv  MM$** % ? > >s A=B''B0c|jdjfdj|jy)Nzimport c&jdSrerfr(srrhz(_Unparser.visit_Import.. 4 0r)rprarnamesrs` r visit_Importz_Unparser.visit_Imports( ) 0$--Lrc0jdjd|jxsdz|jrj|jjdj fdj |j y)Nzfrom .rz import c&jdSrerfr(srrhz,_Unparser.visit_ImportFrom..rr)rprgrjmodulerarrrs` rvisit_ImportFromz_Unparser.visit_ImportFromsd ' 3$**/*+ ;; JJt{{ # : 0$--LrcJ|j|jD]D}|jtj||j ||j dF|j |j|j|x}r|j |yy)N = ) rptargetsrr8r=rrgr-r)rr%rrs r visit_Assignz_Unparser.visit_Assigns llF    1 16 : MM& ! JJu # djj!006 6< 6 JJ| $ 7rc|j|j|j|jd|j|j j jzdz|j|jy)Nr~z= ) rprrrgbinopr4rrrsr-rs rvisit_AugAssignz_Unparser.visit_AugAssignsZ  dkk" 3DGG$5$5$>$>??$FG djj!rc|j|jdd|j xrt|jt 5|j |jddd|jd|j |j|jr-|jd|j |jyy#1swYoxYw)Nrarbr#r) rprr{rrrCrrg annotationr-rs rvisit_AnnAssignz_Unparser.visit_AnnAssigns __S#4;;'X:dkkSW;X Y MM$++ &Z 4 doo& :: JJu  MM$** %  Z Ys CCc|jd|jr-|jd|j|jyy)Nreturnr~)rpr-rgrrs r visit_Returnz_Unparser.visit_Returns5 ( :: JJsO MM$** % rc&|jdy)Npassrprs r visit_Passz_Unparser.visit_Passs &rc&|jdy)Nbreakrrs r visit_Breakz_Unparser.visit_Breaks 'rc&|jdy)Ncontinuerrs rvisit_Continuez_Unparser.visit_Continues *rc|jdjfdj|jy)Nzdel c&jdSrerfr(srrhz(_Unparser.visit_Delete..rr)rprarrrs` r visit_Deletez_Unparser.visit_Deletes( & 0$--Nrc|jd|j|j|jr-|j d|j|jyy)Nzassert r_)rprtestr&rgrs r visit_Assertz_Unparser.visit_AssertsF ) dii 88 JJt  MM$(( # rc|jdjfdj|jy)Nzglobal c&jdSrerfr(srrhz(_Unparser.visit_Global..rrrprargrrs` r visit_Globalz_Unparser.visit_Globals( ) 0$**djjIrc|jdjfdj|jy)Nz nonlocal c&jdSrerfr(srrhz*_Unparser.visit_Nonlocal..rrrrs` rvisit_Nonlocalz_Unparser.visit_Nonlocals( + 0$**djjIrcT|jtj|5|jd|jrV|jd|j tj |j|j|jdddy#1swYyxYw)Nawaitr~)rr8rMrgr-rrNrrs r visit_Awaitz_Unparser.visit_Awaitl  !2!2D 9 JJw zz 3##K$4$4djjA djj) : 9 9 A4BB'cT|jtj|5|jd|jrV|jd|j tj |j|j|jdddy#1swYyxYw)Nyieldr~)rr8r>rgr-rrNrrs r visit_Yieldz_Unparser.visit_YieldrrcH|jtj|5|jd|js t d|j tj|j|j|jdddy#1swYyxYw)Nz yield from z-Node can't be used without a value attribute.) rr8r>rgr-rrrNrrs rvisit_YieldFromz_Unparser.visit_YieldFromsm  !2!2D 9 JJ} %:: !PQQ    0 0$** = MM$** % : 9 9s A.BB!c8|jd|js|jr tdy|j d|j |j|jr-|j d|j |jyy)Nraisez*Node can't use cause without an exception.r~z from )rpexccauserrgrrs r visit_Raisez_Unparser.visit_Raisesn 'xxzz #MOO  3 dhh :: JJx MM$** % rc`|jd|j5|j|jddd|jD]}|j||j rE|jd|j5|j|j ddd|j rF|jd|j5|j|j dddyy#1swYxYw#1swYhxYw#1swYyxYw)Ntryelsefinally)rprzrrVhandlersorelse finalbody)rr%exs r do_visit_tryz_Unparser.do_visit_trys % ZZ\ MM$)) $--B MM"  ;; IIf  dkk* >> IIi  dnn- \ s#D D&D$ DD!$D-ct|j} d|_|j|||_y#||_wxYw)NFrZrrr%prev_in_try_stars r visit_Tryz_Unparser.visit_Trys;,, 1 %D    d # 0D  0D . 7ct|j} d|_|j|||_y#||_wxYw)NTrrs r visit_TryStarz_Unparser.visit_TryStars;,, 1 $D    d # 0D  0D rc|j|jrdnd|jr,|jd|j |j|j r,|jd|j|j |j 5|j |jdddy#1swYyxYw)Nzexcept*exceptr~ as )rprZr,rgrrzrzrVrs rvisit_ExceptHandlerz_Unparser.visit_ExceptHandler s t00)h? 99 JJsO MM$)) $ 99 JJv  JJtyy ! ZZ\ MM$)) $\\s CCc|j|jD]$}|jd|j|&|jd|jzt |dr|j |j|jdd|jxs |j5d}|jD])}|r|jdnd }|j|+|jD])}|r|jdnd }|j|+ ddd|j5|j|dddy#1swY4xYw#1swYyxYw) N@zclass type_paramsrarb)rFr_T)rmdecorator_listrprrzr_type_params_helperrrbasesrFrgrzr)rr%decocommaes rvisit_ClassDefz_Unparser.visit_ClassDefs$ ''D IIcN MM$ ( (TYY&' 4 '  $ $T%5%5 6 __S#4::3N_ OEZZJJt$ E a  ]]JJt$ E a #PZZ\  3 3D 9\P O\s5A3EE(E%(E1c(|j|dy)Ndef_function_helperrs rvisit_FunctionDefz_Unparser.visit_FunctionDef2s dE*rc(|j|dy)Nz async defr rs rvisit_AsyncFunctionDefz _Unparser.visit_AsyncFunctionDef5s dK0rc|j|jD]$}|jd|j|&|dz|jz}|j|t |dr|j |j|jdd5|j|jddd|jr,|jd|j|j|j|j|5|j|dddy#1swY}xYw#1swYyxYw)Nrr~rrarbrrv)rmrrprrzrrrr~rErrgrzrr)rr% fill_suffixrdef_strs rr z_Unparser._function_helper8s ''D IIcN MM$ (#dii/ ' 4 '  $ $T%5%5 6 \\#s # MM$)) $$ << JJv  MM$,, ' ZZd33D9Z :  3 3D 9; : $ # ; :s D8E8EE c|Kt|dkDr<jdd5jfdj|dddyyy#1swYyxYw)Nrrcrlc&jdSrerfr(srrhz/_Unparser._type_params_helper..L 4(8r)rHr~rar)rrs` rrz_Unparser._type_params_helperIsO  "s;'7!';c3' 8$--U('(< "''s !AAc|j|j|jr-|jd|j|jyyNr#)rgrzboundrrs r visit_TypeVarz_Unparser.visit_TypeVarNs: 499 :: JJt  MM$** % rc@|jd|jzyNrrgrzrs rvisit_TypeVarTuplez_Unparser.visit_TypeVarTupleTs 3?#rc@|jd|jzyN**rrs rvisit_ParamSpecz_Unparser.visit_ParamSpecWs 4$))#$rc|jd|j|j|j|j|j d|j|j y)Nztype r)rprrzrrrgr-rs rvisit_TypeAliasz_Unparser.visit_TypeAliasZsN ' dii    !1!12 5 djj!rc(|jd|y)Nzfor  _for_helperrs r visit_Forz_Unparser.visit_Foras &rc(|jd|y)Nz async for r$rs rvisit_AsyncForz_Unparser.visit_AsyncFords t,rcf|j||jtj|j|j |j|j d|j |j|j|j|5|j |jddd|jrF|jd|j5|j |jdddyy#1swY\xYw#1swYyxYw)N in rvr) rprr8r=rrrgr\rzrrVr)rrpr%s rr%z_Unparser._for_helpergs $ K--t{{; dkk" 6 dii ZZd33D9Z : MM$)) $; ;; IIf  dkk* ; :s$D5D'D$'D0c|jd|j|j|j5|j|jddd|j rt |j dk(rt|j dtr|j d}|jd|j|j|j5|j|jddd|j r6t |j dk(rt|j dtr|j rF|jd|j5|j|j dddyy#1swYOxYw#1swYxYw#1swYyxYw)Nzif r\rzelif r) rprrrzrVrrHrIfrs rvisit_Ifz_Unparser.visit_Ifts+ % dii ZZ\ MM$)) $kkc$++.!3 4;;q>SU8V;;q>D IIg  MM$)) $ dii( kkc$++.!3 4;;q>SU8V ;; IIf  dkk* \ s#F&-F3F?&F03F<?Gc|jd|j|j|j5|j|jddd|j rF|jd|j5|j|j dddyy#1swY\xYw#1swYyxYw)Nzwhile r)rprrrzrVrrs r visit_Whilez_Unparser.visit_Whiles ( dii ZZ\ MM$)) $ ;; IIf  dkk* \sB4C4B=C cjdjfdj|jj j |5j|j dddy#1swYyxYw)Nzwith c&jdSrerfr(srrhz&_Unparser.visit_With..rrrvrprarrrzrrVrs` r visit_Withz_Unparser.visit_Withs] ' 0$--L ZZd33D9Z : MM$)) $; : : BB cjdjfdj|jj j |5j|j dddy#1swYyxYw)Nz async with c&jdSrerfr(srrhz+_Unparser.visit_AsyncWith..rrrvr2rs` rvisit_AsyncWithz_Unparser.visit_AsyncWiths] -  0$--L ZZd33D9Z : MM$)) $; : :r4 quote_typesescape_special_whitespacec fd}djt||}dvr|Dcgc] }|tvs |}}|Dcgc] }|vs| }}|s+tt fd|Dd}dd|gfSr1|j fd |dddk(rddd zdz|fScc}wcc}w) Ncs|dvr|S|dk(s|js |jdjdS|S)Nz \unicode_escapeascii) isprintablerr)rr:s r escape_charz2_Unparser._str_literal_helper..escape_charsB-fDy xx 0188AAHrr^r]c32K|]}d|vs |ywrerf)rgqstrings rrkz0_Unparser._str_literal_helper..sC[F1IN![s rr\r c|ddk(S)Nrr rf)rCescaped_strings rrhz/_Unparser._str_literal_helper..sqt~b7I/Ir)rr=)rtr< _MULTI_QUOTESrur;sort) rrDr9r:rApossible_quotesrCquoterFs ` ` @r_str_literal_helperz_Unparser._str_literal_helpers  [&!9:% > !*9P/QQ-=Oq/OP&5Qo.9P1oQ&\FC[CVAYOE!B<%( (   %I Jq!!$r(::!/!4t!;nR>P!P..#QQs B;B; CCr9cj |j||\}}|d}|j|||y)NrLr)rKrg)rrDr9 quote_types r_write_str_avoiding_backslashesz)_Unparser._write_str_avoiding_backslashessAY"66v;6W  ^  j\&*67rc&|jdg}|jD]\}|j5}|j|ddd|j dj t |tf^g}tt}d}|D]l\}}|r8|j||d\}} t| j|rd}n2| }nd|vr|D cgc] } | tvs | }} |j |n|rNdg}|j|D]6\}}|rtd|z}d } |t!| d }|j |8dj |}|d } |j| || y#1swY>xYwcc} w) Nr_r^FTr8r]rQrPz'"r r)rgrJru_write_fstring_innerrprtrr+r? _ALL_QUOTESrKr: isdisjointrGrrurH) rr% fstring_partsr-rsnew_fstring_partsr9fallback_to_repr is_constantnew_quote_typesrCexpected_prefixrNs rvisit_JoinedStrz_Unparser.visit_JoinedStrs 3 [[EF))%0!  *UH"=> !;'  "/ E;)-)A)A +.2*B*& '22;?'+$- *5L+Qm9Kq+ L  $ $U +#0 !'K  # # %&3"{ u-E&+O!#o"6r:E!((/ '4)* ^  j\% 56Q!*MsF F*FF c0t|tr%|jD]}|j||yt|trt|j t r|j jddjdd}|rH|jdd}|jdd }|jd d }|jd d }|j|yt|tr|j|ytd|)Nis_format_spec{z{{}z}}r=z\\rOz\'rPz\"r]z\nz"Unexpected node inside JoinedStr, ) r JoinedStrrJrQr+r-rSreplacergFormattedValuevisit_FormattedValuer)rr%r]r-s rrQz_Unparser._write_fstring_inners dI &))%)O% h 'Jtzz3,GJJ&&sD199#tDE dF3 c51 c51 dE2 JJu  n -  % %d +A$JK Krcfd}jdd5||j}|jdrjdj||jdk7r'jdt |j|j r.jdj|j d dddy#1swYyxYw) Nct}|jtjj ||j |Sr*)r,rr8r?r;r)innerunparserrs r unparse_innerz5_Unparser.visit_FormattedValue..unparse_inner s>!tDz|H  # #K$4$4$9$9$;U C>>%( (rr^r_r~r !ryTr\)r~r-rrg conversionchr format_specrQ)rr%rhexprs` rrcz_Unparser.visit_FormattedValue s ) \\#s # ,Ds# 3 JJt "$ Qs4??3456 3))$*:*:4)P$ # #s B6CC!c:|j|jyr*)rgrDrs r visit_Namez_Unparser.visit_Names 477rc|j|jdk(r|jd|j|jt y)NurL)rpkindrgrOr-rGrs rrz_Unparser._write_docstrings9 99  JJsO ,,TZZ],Src \t|ttfrN|jt |j dt j ddt dt dy|jr"t|tr|j|y|jt |y)Ninfnanra-rb) rr/r0rgrura_INFSTRrTrSrOr+s r_write_constantz_Unparser._write_constant%s eeW- . JJU (!G9AgYa 89   $ $E3)?  0 0 7 JJtE{ #rcf|j}t|tr8|jdd5|j |j |dddy|dur|j dy|jdk(r|j d|j |jy#1swYyxYw)Nrarb....rq)r-rrr~rkrxrgrr)rr%r-s rrz_Unparser.visit_Constant3s  eU #c3' 4 4e<(' c\ JJu yyC 3   ,('s B''B0cjdd5jfdj|jdddy#1swYyxYw)Nrcrlc&jdSrerfr(srrhz&_Unparser.visit_List..Arir)r~rarr=rs` r visit_Listz_Unparser.visit_List?s6 \\#s # OO4dmmTYY O$ # # +AAc|jdd5|j|j|jD]}|j| dddy#1swYyxYw)Nrcrlr~relt generatorsrr%gens rvisit_ListCompz_Unparser.visit_ListCompCF \\#s # MM$(( # c"'$ # # >AA$c|jdd5|j|j|jD]}|j| dddy#1swYyxYwrrrs rvisit_GeneratorExpz_Unparser.visit_GeneratorExpIrrc|jdd5|j|j|jD]}|j| dddy#1swYyxYw)Nr^r_rrs r visit_SetCompz_Unparser.visit_SetCompOrrc&|jdd5|j|j|jd|j|j|j D]}|j| dddy#1swYyxYw)Nr^r_r#)r~rrrgr-rrs rvisit_DictCompz_Unparser.visit_DictCompUsb \\#s # MM$(( # JJt  MM$** % c"' $ # #s A*BBc2|jr|jdn|jd|jtj|j |j |j |jd|jtjj|jg|j|j |j|jD]$}|jd|j |&y)Nz async for z for r* if ) is_asyncrgrr8r=rrr?r;r\ifs)rr% if_clauses rvisit_comprehensionz_Unparser.visit_comprehension]s == JJ} % JJw  K--t{{; dkk" 6K,,113TYYJJ dii I JJv  MM) $"rc.|jtj|5|jtjj |j |j |j|j |jd|j|j |jd|jtj|j|j|jdddy#1swYyxYw)Nrz else ) rr8r?rr;rVrrrgrrs r visit_IfExpz_Unparser.visit_IfExpks  !1!14 8    0 0 5 5 7DII N MM$)) $ JJv  MM$)) $ JJx    0 0$++ > MM$++ &9 8 8s C!D  Dc|jrFjdd5jfdj|jdddyj dy#1swYyxYw)Nr^r_c&jdSrerfr(srrhz%_Unparser.visit_Set..xrrz{*()})r=r~rarrgrs` r visit_Setz_Unparser.visit_SetusP 99c3' 8$--S(' JJw  ('s +A&&A/c fdfd}jdd5jfd|t|j|jdddy#1swYyxYw)Nclj|jdj|yrrrg)kvrs rwrite_key_value_pairz2_Unparser.visit_Dict..write_key_value_pairs' MM!  JJt  MM! rc|\}}|Cjdjtj|j |y||yr)rgrr8rDr)rrrrrs r write_itemz(_Unparser.visit_Dict..write_itemsKDAqy 4 ##K$4$4a8 a $Q*rr^r_c&jdSrerfr(srrhz&_Unparser.visit_Dict..rr)r~rarLrIrJ)rr%rrs` @r visit_Dictz_Unparser.visit_Dict~sK  +\\#s # OO(*c$))T[[6Q $ # #s 5AA'c|jddt|jdk(xs"|j|tj kD5|j |j|jdddy#1swYyxYw)Nrarbr)rrHr=rr8r=rkrrs r visit_Tuplez_Unparser.visit_Tuplesg __    Na  P4#6#6t#<{?P?P#P OODMM499 5    s 'A>>B~not+rv)InvertNotr5r6)rrrrvc|j|jjj}|j|}|j ||5|j ||tjur|j d|j||j|j|jdddy#1swYyxYwNr~) unopr4rrrsunop_precedencerrgr8rKrr7r)rr%operatoroperator_precedences r visit_UnaryOpz_Unparser.visit_UnaryOps99TWW..778"228<  !4d ; JJx #+*<*<< 3    3T\\ B MM$,, '< ; ;s A,CC rr/%<<>>|^&//r) rNrOMultMatMultDivModLShiftRShiftBitOrBitXorBitAndFloorDivPow) rrvrrrrrrrrrrr)rc6|j|jjj}|j|}|j ||5||j vr|j}|}n|}|j}|j||j|j|j|jd|d|j||j|j|jdddy#1swYyxYwr) rr4rrrsbinop_precedencer binop_rassocr;rrPrrgrQ)rr%rrleft_precedenceright_precedences r visit_BinOpz_Unparser.visit_BinOps::dgg//889"33H=  !4d ;4,,,"5":":"<#6 "5#6#;#;#=    ; MM$)) $ JJ8*A '    0$** = MM$** %< ; ;s B7DDz==z!=z>=iszis notinznot in) EqNotEqLtLtEGtGtEIsIsNotInNotInc|jtj|5|jtjj |j g|j |j|j t|j|j D]N\}}|jd|j|jjzdz|j|P dddy#1swYyxYwr)rr8rCrr;rP comparatorsrrLopsrgcmpopsrrrs)rr%ors r visit_Comparez_Unparser.visit_Compares  $ 7 D    4 4 6 UDDTDT U MM$)) $DHHd&6&671 3Q[[-A-A!BBSHI a 88 7 7s CC<<Dandor)AndOr)rrc*j|jjj}j|fd}j |5d|dj fd||jdddy#1swYyxYw)Ncljj|j|yr*)r;rr)r%rrs rincreasing_level_traversez9_Unparser.visit_BoolOp..increasing_level_traverses/"5":":"<     3T : MM$ rr~c&jSr*rf)rrsrrhz(_Unparser.visit_BoolOp..s DJJqMr)boolopsr4rrrsboolop_precedencerrarJ)rr%rrrrs` @@r visit_BoolOpz_Unparser.visit_BoolOpsy<< 1 1 : :;"44X>  !4d ;H:QA OO13Ldkk Z< ; ;s (B  Bc|jtj|j|j |jt |jt r5t |jjtr|jd|jd|j|jy)Nr~r) rr8rNr-rrr+r.rgrrs rvisit_Attributez_Unparser.visit_Attributesu K,,djj9 djj! djj( + 4::;K;KS0Q JJsO 3 499rc|jtj|j|j |j|j dd5d}|j D])}|r|jdnd}|j |+|jD])}|r|jdnd}|j |+ dddy#1swYyxYw)NrarbFr_T) rr8rNrBrr~rErgrF)rr%rrs r visit_Callz_Unparser.visit_Calls K,,dii8 dii \\#s #EYYJJt$ E a  ]]JJt$ E a #$ # #s A3CCcd}|jtj|j|j |j|j dd5||j r1|j|j|j jn|j |j dddy#1swYyxYw)Nc>t|txr |jSr*)rr;r=) slice_values ris_non_empty_tuplez5_Unparser.visit_Subscript..is_non_empty_tuple&s;.%$$ rrcrl) rr8rNr-rr~rrkr=)rr%rs rvisit_Subscriptz_Unparser.visit_Subscript%s  K,,djj9 djj! \\#s #!$**- tzz? djj) $ # #s ACC c|jd|jtj|j|j |jyr)rgrr8rDr-rrs r visit_Starredz_Unparser.visit_Starred5s7 3 K,,djj9 djj!rc&|jdy)Nrzrfrs rvisit_Ellipsisz_Unparser.visit_Ellipsis:s 5rc4|jr|j|j|jd|jr|j|j|jr-|jd|j|jyy)Nry)lowerrrguppersteprs r visit_Slicez_Unparser.visit_Slice=sb :: MM$** % 3 :: MM$** % 99 JJsO MM$)) $ rc|jd|j|j|j5|jD]}|j| dddy#1swYyxYw)Nzmatch )rprsubjectrzcases)rr%cases r visit_Matchz_Unparser.visit_MatchGsK ( dll# ZZ\  d##\\s #A**A3c|j|j|jr-|jd|j|jyyr)rgargrrrs r visit_argz_Unparser.visit_argNs: 488 ?? JJt  MM$// * rcld}|j|jz}dgt|t|jz z|jz}t t ||dD]\}}|\}}|rd}n|j d|j||r"|j d|j||t|jk(so|j d|js |jr|rd}n|j d|j d|jrq|j |jj|jjr6|j d|j|jj|jrot |j|jD]L\}}|j d|j||s+|j d|j|N|jr|rd}n|j d|j d |jjz|jjr7|j d|j|jjyyy) NTr\Fr_r`z, /rr#r) posonlyargsrErHdefaultsrrLrgrvararg kwonlyargsrr kw_defaultskwarg) rr%rall_argsrrelementsads rvisit_argumentsz_Unparser.visit_argumentsTs##dii/6S]S-??@4==P(Xx)@!DOE8DAq 4 MM!  3 a D,,-- 5! E ;;$// 4 JJsO{{ 4;;??+;;))JJt$MM$++"8"89 ??DOOT-=-=>1 4  a JJsOMM!$ ? :: 4 JJtdjjnn, -zz$$ 4  djj334% rc|j|jdn,|j|j|jd|j|jy)Nrr`)rrgrr-rs r visit_keywordz_Unparser.visit_keywordsC 88  JJt  JJtxx JJsO djj!rc|jtj|5|jd|j 5}|j |j dddr|jdg||jd|jtj|j|j |jdddy#1swY}xYw#1swYyxYw)Nlambdar~r#) rr8r?rgrurrErrV)rr%rss r visit_Lambdaz_Unparser.visit_Lambdas  !1!14 8 JJx F dii(! 3(( JJt     0 0$)) < MM$)) $9 8 9 8s$"C'CA3C'C$ C''C0c|j|j|jr|jd|jzyyNr)rgrzasnamers r visit_aliasz_Unparser.visit_aliass3 499 ;; JJv + , rc|j|j|jr-|jd|j|jyyr)r context_expr optional_varsrgrs rvisit_withitemz_Unparser.visit_withitems@ d''(    JJv  MM$,, - rcL|jd|j|j|jr,|j d|j|j|j 5|j|j dddy#1swYyxYw)Nzcase r)rprpatternguardrgrzrVrs rvisit_match_casez_Unparser.visit_match_casesd ' dll# :: JJv  MM$** % ZZ\ MM$)) $\\s 5BB#c:|j|jyr*)rr-rs rvisit_MatchValuez_Unparser.visit_MatchValues djj!rc:|j|jyr*)rxr-rs rvisit_MatchSingletonz_Unparser.visit_MatchSingletons TZZ(rcjdd5jfdj|jdddy#1swYyxYw)Nrcrlc&jdSrerfr(srrhz/_Unparser.visit_MatchSequence..rr)r~rarpatternsrs` rvisit_MatchSequencez_Unparser.visit_MatchSequences8 \\#s # OO($-- $ # #r~cL|j}|d}|jd|y)N_r)rzrg)rr%rzs rvisit_MatchStarz_Unparser.visit_MatchStars'yy <D Qtf:rc 8fd}jdd5|j}jfd|t||jd|j }|'|rj dj d|dddy#1swYyxYw) Ncv|\}}j|jdj|yrr)pairrprs rwrite_key_pattern_pairz<_Unparser.visit_MatchMapping..write_key_pattern_pairs0DAq MM!  JJt  MM! rr^r_c&jdSrerfr(srrhz._Unparser.visit_MatchMapping..rrTstrictr_r)r~rIrarLr&restrg)rr%r/rIr3s` rvisit_MatchMappingz_Unparser.visit_MatchMappings  \\#s #99D OO(&D$--5  99DJJt$ Rv;'$ # #s A.BBc jtj|jj |jj dd5|j }jfdj||j}|rDfd}|rjdjfd|t||jddddy#1swYyxYw) Nrarbc&jdSrerfr(srrhz,_Unparser.visit_MatchClass..rrcZ|\}}j|dj|y)Nr`)rgr)r-rrrs rwrite_attr_patternz6_Unparser.visit_MatchClass..write_attr_patterns*$(MD'JJ$qz*MM'*rr_c&jdSrerfr(srrhz,_Unparser.visit_MatchClass..sDJJt,rTr1) rr8rNrxrr~r&ra kwd_attrsrgrL kwd_patterns)rr%r&attrsr8s` rvisit_MatchClassz_Unparser.visit_MatchClasss K,,dhh7 dhh \\#s #}}H OO($-- NNE+ JJt$,&t00>$ # #s A?C!!C*c|j}|j}||jdy||j|jy|jtj |5|j tj|j|j|j|jd|jdddy#1swYyxYw)Nr)r) rzrrgrr8r?rrEr)rr%rzrs r visit_MatchAsz_Unparser.visit_MatchAssyy,, < JJsO _ JJtyy !$$[%5%5t<##KOOT\\B dll+ T$))-.=<.sDJJu$5r)rr8rErr;r&rarrs` r visit_MatchOrz_Unparser.visit_MatchOrsb  $ 7 D    4 4 6 G G OO5t}}dmm T8 7 7s A$BB)r^r*)F)rsrrrrarkrmrprgrrurzr~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rr rrrr r"r&r(r%r-r/r3r7rRrKrOrZrQrcrorrxrr}rrrrrrrrrrr8rBrKrrrrIrJrHrErFrGrLr frozensetrrrrrrAr@rrrrrrrrrrrrrrrrr!r#r'r*r4r=r?rB __classcell__)rrs@rrSrSs.3" H 1 "''#  ! Q=1 )  %%#$" &MM%" && O$JJ**& & .11 %:4+1:"V & $%"'- ++$+% %&1E$/LFQ8 -7^L&Q$T $ -P# # # # %' ,6%c BD          O ( E"                  __       W%L&$ F!4(G +{~~F [ !$* " %$+ 15f" %- . %")  ((. /UrrSc8t}|j|Sr*)rSr)ast_objrgs runparserGs{H >>' ""r)r rrrrc|tvr7t|xt|<}ddl}|jd|td|St d|d)Nrrrrzmodule 'ast' has no attribute 'rO)_deprecated_globalsglobalsrrrro)rzr-rs r __getattr__rKs` """5d";; $%4&M#rT)TF)r\)Tr*)Wsysre_ast contextlibrrenumrrrrrXrrrrrrrrrrrrrobjectrrrrrr+rrrrpropertyrrr,rrr rrrrrr.r/r0rSbytesboolrrrrmrrr"r;r)r,r%modr. expr_contextr1r3r5ru float_info max_10_exprwr8_SINGLE_QUOTESrGrRrSrGrJpoprIrKrers)rzs0rrvs4 2,,5t5,8$v@@F" F.  0 34  05"J 7(&7(t8k8xU x)Y/HJ)Y/HJ14162 (d(dH8t 6x4 6 #ug # E84:t$ tCyl  $  .J 5 U 7Iz %C%E 3u3 uf, 5EJ:C::l::|::L: cnn//!34 4 g> /// gU gUR!#DC ')-- C DV0 zFQsH;