grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jüéã@södZddlZddlTddlmZmZddlmZmZd`ddd œd d „Z d d „Z daddœdd„Z dd„Z dd„Z dbdd„Zdd„Zdd„Zdcdd„Zdd „Zd!d"„Zdd#œd$d%„Zd&d'„ZGd(d)„d)eƒZGd*d+„d+eƒZeed,ƒs…d-d.„Zd/d0„Zeeeƒe_eeeƒe_Gd1d2„d2e ƒZ!d3d4„Z"Gd5d6„d6ee!d7�Z#Gd8d9„d9ee!d7�Z$Gd:d;„d;ee!d7�Z%Gdd?„d?ee!d7�Z'e#e(e)e*fe$e+fe%e,fe&e dƒe-fe'e d@ƒfiZ.e#e-fiZ/e-d=e dƒd=e(d6e)d6e*d6e+d9e,d;e d@ƒd?iZ0GdAdB„dBe1ƒZ2GdCdD„dDe2ƒZ3GdEdF„dFe2ƒZ4ee5dGƒ�s"dHdI„Z6dJdK„Z7ee6e7ƒe5_8GdLdM„dMe9ƒZ:GdNdO„dOe;ƒZdTe?ej@jAdƒZBGdUdV„dVeƒZCdWZDdXZEgeD¢eE¢RZFGdYdZ„dZeƒZGd[d\„ZHd]d^„ZIeJd_k�ryeIƒdSdS)daH ast ~~~ The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows modifications of it. An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as a flag to the `compile()` builtin function or by using the `parse()` function from this module. The result will be a tree of objects whose classes all inherit from `ast.AST`. A modified abstract syntax tree can be compiled into a Python code object using the built-in `compile()` function. Additionally various helper functions are provided that make working with the trees simpler. The main intention of the helper functions and this module in general is to provide an easy to use interface for libraries that work tightly with the python syntax (template engines for example). :copyright: Copyright 2008 by Armin Ronacher. :license: Python License. éN)Ú*)ÚcontextmanagerÚ nullcontext)ÚIntEnumÚautoú ÚexecF)Ú type_commentsÚfeature_versioncCsFt}|r|tO}t|tƒr|\}}|}n|durd}t|||||d�S)z½ Parse the source into an AST node. Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). Pass type_comments=True to get back type comments where the syntax allows. Néÿÿÿÿ)Ú_feature_version)Z PyCF_ONLY_ASTZPyCF_TYPE_COMMENTSÚ isinstanceÚtupleÚcompile)ÚsourceÚfilenameÚmoder r ÚflagsÚmajorÚminor©rú*/opt/alt/python310/lib64/python3.10/ast.pyÚparse!s  ÿrcsft|tƒrt| d¡dd�}t|tƒr|j}dd„‰‡fdd„‰‡fdd „‰‡‡‡‡fd d „‰ˆ|ƒS) aT Evaluate an expression node or a string containing only a Python expression. The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, and None. Caution: A complex expression can overflow the C stack and cause a crash. z Úeval©rcSs4d}t|ddƒ}r|d|›�7}t|d|›�ƒ‚)Nzmalformed node or stringÚlinenoz on line ú: )ÚgetattrÚ ValueError)ÚnodeÚmsgÚlnorrrÚ_raise_malformed_nodeCsz+literal_eval.._raise_malformed_nodecs,t|tƒrt|jƒtttfvrˆ|ƒ|jS©N)r ÚConstantÚtypeÚvalueÚintÚfloatÚcomplex©r)r"rrÚ _convert_numHsz"literal_eval.._convert_numcsDt|tƒrt|jttfƒrˆ|jƒ}t|jtƒr| S| Sˆ|ƒSr#)r ZUnaryOpÚopÚUAddÚUSubÚoperand)rr/)r+rrÚ_convert_signed_numLs   z)literal_eval.._convert_signed_numcsLt|tƒr|jSt|tƒrttˆ|jƒƒSt|tƒr"ttˆ|jƒƒSt|t ƒr/t tˆ|jƒƒSt|t ƒrOt|j t ƒrO|j jdkrO|j|jkrNgkrOt ƒSt|tƒrqt|jƒt|jƒkrbˆ|ƒtttˆ|jƒtˆ|jƒƒƒSt|tƒr¢t|jttfƒr¢ˆ|jƒ}ˆ|jƒ}t|ttfƒr¢t|tƒr¢t|jtƒrž||S||Sˆ|ƒS)NÚset) r r$r&ÚTuplerÚmapÚeltsZListÚlistÚSetr1ZCallÚfuncÚNameÚidÚargsÚkeywordsZDictÚlenÚkeysÚvaluesÚdictÚzipZBinOpr,ÚAddÚSubÚleftÚrightr'r(r))rrCrD©Ú_convertr+r0r"rrrFTs4    "ÿ  ÿ   zliteral_eval.._convert)r ÚstrrÚlstripZ ExpressionÚbody)Znode_or_stringrrErÚ literal_eval6s    rJT)ÚindentcsTd‡‡‡‡fdd„ ‰t|tƒstd|jjƒ‚ˆdur$tˆtƒs$dˆ‰ˆ|ƒdS)a� Return a formatted dump of the tree in node. This is mainly useful for debugging purposes. If annotate_fields is true (by default), the returned string will show the names and the values for fields. If annotate_fields is false, the result string will be more compact by omitting unambiguous field names. Attributes such as line numbers and column offsets are not dumped by default. If this is wanted, include_attributes can be set to true. If indent is a non-negative integer or string, then the tree will be pretty-printed with that indent level. None (the default) selects the single line representation. rc sÞˆdurˆd7‰dˆˆ}dˆˆ}nd}d}t|tƒrÍt|ƒ}g}d}ˆ}|jD]@}zt||ƒ} Wn ty?d}Yq+w| durOt||dƒdurOd}q+ˆ| ˆƒ\} } |oY| }|rf| d|| f¡q+| | ¡q+ˆr©|jr©|jD]4}zt||ƒ} Wn ty†Yqtw| dur”t||dƒdur”qtˆ| ˆƒ\} } |ož| }| d|| f¡qt|r¿t|ƒd kr¿d |j j d  |¡f| fSd |j j ||  |¡fd fSt|t ƒré|sÖd Sd||  ‡‡fdd„|Dƒ¡fd fSt |ƒdfS)NéÚ z, Úú, T.z%s=%séz%s(%s)z%s(%s%s)F)z[]Tz[%s%s]c3s�|] }ˆ|ˆƒdVqdS©rNr)Ú.0Úx)Ú_formatÚlevelrrÚ ªs€z(dump.._format..)r ÚASTr%Ú_fieldsrÚAttributeErrorÚappendÚ _attributesr<Ú __class__Ú__name__Újoinr5Úrepr) rrUÚprefixÚsepÚclsr:Z allsimpler;Únamer&Úsimple©rTÚannotate_fieldsÚinclude_attributesrK)rUrrT}s\    þ    ÿ & zdump.._formatzexpected AST, got %rNú )r)r rWÚ TypeErrorr\r]rG)rrfrgrKrrerÚdumpqs  0 rjcCsVdD]&}||jvr(||jvr(t||dƒ}|dus"t||ƒr(| d¡r(t|||ƒq|S)z¬ Copy source location (`lineno`, `col_offset`, `end_lineno`, and `end_col_offset` attributes) from *old_node* to *new_node* if possible, and return *new_node*. )rÚ col_offsetÚ end_linenoÚend_col_offsetNZend_)r[rÚhasattrÚ startswithÚsetattr)Únew_nodeZold_nodeÚattrr&rrrÚ copy_location´s ÿÿ €rscs ‡fdd„‰ˆ|ddddƒ|S)a{ When you compile a node tree with compile(), the compiler expects lineno and col_offset attributes for every node that supports them. This is rather tedious to fill in for generated nodes, so this helper adds these attributes recursively where not already set, by setting them to the values of the parent node. It works recursively starting at *node*. cs¶d|jvrt|dƒs||_n|j}d|jvr%t|ddƒdur"||_n|j}d|jvr6t|dƒs3||_n|j}d|jvrJt|ddƒdurG||_n|j}t|ƒD] }ˆ|||||ƒqNdS)Nrrlrkrm)r[rnrrrlrkrmÚiter_child_nodes)rrrkrlrmÚchild©Ú_fixrrrwÍs&       ÿz#fix_missing_locations.._fixrLrrr*rrvrÚfix_missing_locationsÅs rxrLcCstt|ƒD]3}t|tƒrt|ddƒ||_qd|jvr#t|ddƒ||_d|jvr7t|ddƒ}dur7|||_q|S)z´ Increment the line number and end line number of each node in the tree starting at *node* by *n*. This is useful to "move code" to a different location in a file. rrrlN)Úwalkr Z TypeIgnorerrr[rl)rÚnrurlrrrÚincrement_linenoès     €r{c cs8�|jD]}z |t||ƒfVWqtyYqwdS)zs Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*. N)rXrrY)rÚfieldrrrÚ iter_fieldsÿs€  ÿýr}ccsN�t|ƒD]\}}t|tƒr|Vqt|tƒr$|D] }t|tƒr#|VqqdS)z‰ Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes. N)r}r rWr5)rrcr|Úitemrrrrt s€   €úrtcCs–t|ttttfƒstd|jjƒ‚|jrt|jdt ƒsdS|jdj }t|t ƒr-|j }nt|t ƒr|| ¡||… ¡S|rOt|| ¡d|… ¡ƒ}nd}||| ¡|d… ¡} || ¡d|… ¡} ||d|…}|  d| ¡|  | ¡d  |¡S)aBGet source code segment of the *source* that generated *node*. If some location information (`lineno`, `end_lineno`, `col_offset`, or `end_col_offset`) is missing, return None. If *padded* is `True`, the first line of a multi-line statement will be padded with spaces to match its original position. NrLrNr) rlrmrrkrYr�ÚencodeÚdecoder�ÚinsertrZr^) rrr�rrlrkrmr‹ZpaddingÚfirstZlastrrrÚget_source_segmentWs,     ÿ   r•ccsD�ddlm}||gƒ}|r | ¡}| t|ƒ¡|V|sdSdS)zå Recursively yield all descendant nodes in the tree starting at *node* (including *node* itself), in no specified order. This is useful if you only want to modify nodes in place and don't care about the context. r)ÚdequeN)Ú collectionsr–ÚpopleftÚextendrt)rr–Ztodorrrry|s€   ýryc@s(eZdZdZdd„Zdd„Zdd„ZdS) Ú NodeVisitora< A node visitor base class that walks the abstract syntax tree and calls a visitor function for every node found. This function may return a value which is forwarded by the `visit` method. This class is meant to be subclassed, with the subclass adding visitor methods. Per default the visitor functions for the nodes are ``'visit_'`` + class name of the node. So a `TryFinally` node visit function would be `visit_TryFinally`. This behavior can be changed by overriding the `visit` method. If no visitor function exists for a node (return value `None`) the `generic_visit` visitor is used instead. Don't use the `NodeVisitor` if you want to apply changes to nodes during traversing. For this a special visitor exists (`NodeTransformer`) that allows modifications. cCs"d|jj}t|||jƒ}||ƒS)z Visit a node.Úvisit_)r\r]rÚ generic_visit)ÚselfrÚmethodÚvisitorrrrÚvisitžs zNodeVisitor.visitcCsTt|ƒD]#\}}t|tƒr|D] }t|tƒr| |¡qqt|tƒr'| |¡qdS)z9Called if no explicit visitor function exists for a node.N)r}r r5rWr )r�rr|r&r~rrrrœ¤s   €þ  €úzNodeVisitor.generic_visitc Cs |j}t t|ƒ¡}|dur t ¡D] \}}t||ƒr|}nq|durKd|}zt||ƒ}Wn ty8Ynwddl}|  |›d�t d¡||ƒS|  |¡S)Nr›rz" is deprecated; add visit_Constanté) r&Ú_const_node_type_namesÚgetr%Úitemsr rrYÚwarningsÚwarnÚDeprecationWarningrœ) r�rr&Z type_namerbrcržrŸr¥rrrÚvisit_Constant®s* þ ÿ ÿ zNodeVisitor.visit_ConstantN)r]Ú __module__Ú __qualname__Ú__doc__r rœr¨rrrrršŠs  ršc@óeZdZdZdd„ZdS)ÚNodeTransformeraC A :class:`NodeVisitor` subclass that walks the abstract syntax tree and allows modification of nodes. The `NodeTransformer` will walk the AST and use the return value of the visitor methods to replace or remove the old node. If the return value of the visitor method is ``None``, the node will be removed from its location, otherwise it is replaced with the return value. The return value may be the original node in which case no replacement takes place. Here is an example transformer that rewrites all occurrences of name lookups (``foo``) to ``data['foo']``:: class RewriteName(NodeTransformer): def visit_Name(self, node): return Subscript( value=Name(id='data', ctx=Load()), slice=Constant(value=node.id), ctx=node.ctx ) Keep in mind that if the node you're operating on has child nodes you must either transform the child nodes yourself or call the :meth:`generic_visit` method for the node first. For nodes that were part of a collection of statements (that applies to all statement nodes), the visitor may also return a list of nodes rather than just a single node. Usually you use the transformer like this:: node = YourTransformer().visit(node) cCs®t|ƒD]P\}}t|tƒr:g}|D]!}t|tƒr-| |¡}|dur"qt|tƒs-| |¡q| |¡q||dd…<qt|tƒrT| |¡}|durNt||ƒqt|||ƒq|Sr#) r}r r5rWr r™rZÚdelattrrp)r�rr|Ú old_valueZ new_valuesr&rqrrrrœès(          €zNodeTransformer.generic_visitN)r]r©rªr«rœrrrrr­Äs #r­rzcCó|jS)zDeprecated. Use value instead.©r&©r�rrrÚ_getterór³cCó ||_dSr#r±©r�r&rrrÚ_setteró r·c@seZdZdd„Zdd„ZdS)Ú_ABCcGs d|_dS)Nz3Deprecated AST node class. Use ast.Constant instead)r«)rbr:rrrÚ__init__r¸z _ABC.__init__cCsdt|tƒsdS|tvr,z|j}Wn tyYdSwt|t|ƒo+t|t |d¡ƒ St ||¡S)NFr) r r$Ú _const_typesr&rYÚ_const_types_notr£r%Ú__instancecheck__)rbÚinstr&rrrr½s   ÿþ z_ABC.__instancecheck__N)r]r©rªrºr½rrrrr¹s r¹cOsp|D]}||jvr q|j |¡}|t|ƒkr t|j›d|›�ƒ‚q|tvr,t|i|¤ŽStj|g|¢Ri|¤ŽS)Nz" got multiple values for argument )rXÚindexr<rir]r»r$Ú__new__)rbr:ÚkwargsÚkeyÚposrrrÚ_new"s   ÿrÄc@óeZdZdZeZdS)ÚNum)rzN©r]r©rªrXrÄrÀrrrrrÆ.órÆ)Ú metaclassc@rÅ)r„©r…NrÇrrrrr„2rÈr„c@rÅ)ÚBytesrÊNrÇrrrrrË6rÈrËc@seZdZeZdS)Ú NameConstantN)r]r©rªrÄrÀrrrrrÌ:órÌc@r¬)ÚEllipsisrcOs6|turtdg|¢Ri|¤ŽStj|g|¢Ri|¤ŽS)N.)rÎr$rÀ)rbr:rÁrrrrÀ@szEllipsis.__new__N)r]r©rªrXrÀrrrrrÎ=s rÎ.c@óeZdZdZdS)ÚslicezDeprecated AST node class.N©r]r©rªr«rrrrrÐ[rÍrÐc@r¬)ÚIndexz@Deprecated AST node class. Use the index value directly instead.cKs|Sr#r)rbr&rÁrrrrÀ`sz Index.__new__N©r]r©rªr«rÀrrrrrÒ^s rÒc@seZdZdZddd„ZdS)ÚExtSlicez1Deprecated AST node class. Use ast.Tuple instead.rcKstt|ƒtƒfi|¤ŽSr#)r2r5ZLoad)rbÚdimsrÁrrrrÀeszExtSlice.__new__N)rrÓrrrrrÔcsrÔrÕcCr°)zDeprecated. Use elts instead.©r4r²rrrÚ _dims_gettermr´r×cCrµr#rÖr¶rrrÚ _dims_setterqr¸rØc@rÏ)ÚSuiteú/Deprecated AST node class. Unused in Python 3.NrÑrrrrrÙvrÍrÙc@rÏ)ÚAugLoadrÚNrÑrrrrrÛyrÍrÛc@rÏ)ÚAugStorerÚNrÑrrrrrÜ|rÍrÜc@rÏ)ÚParamrÚNrÑrrrrrÝrÍrÝZ1ec@s‚eZdZdZeƒZeƒZeƒZeƒZeƒZ eƒZ eƒZ eƒZ e Z eƒZeƒZeƒZeƒZeƒZeƒZeƒZeƒZeƒZdd„ZdS)Ú _Precedencez5Precedence table that originated from python grammar.cCs(z| |d¡WSty|YSw©NrL)r\rr²rrrÚnextžs  ÿz_Precedence.nextN)r]r©rªr«rÚTUPLEÚYIELDÚTESTÚORÚANDÚNOTÚCMPÚEXPRÚBORÚBXORÚBANDÚSHIFTÚARITHÚTERMÚFACTORÚPOWERÚAWAITÚATOMràrrrrrÞ‡s* rÞ)ú'ú")z"""z'''cseZdZdZddœdd„Zdd„Zdd „Zd d „Zdôd d„Zdd„Z dd„Z e dd„ƒZ e ddœdd„ƒZe dd„ƒZdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Z‡fd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Zd3d4„Zd5d6„Zd7d8„Zd9d:„Zd;d<„Z d=d>„Z!d?d@„Z"dAdB„Z#dCdD„Z$dEdF„Z%dGdH„Z&dIdJ„Z'dKdL„Z(dMdN„Z)dOdP„Z*dQdR„Z+dSdT„Z,dUdV„Z-dWdX„Z.dYdZ„Z/d[d\„Z0d]d^„Z1d_d`„Z2dadb„Z3dcdd„Z4dedf„Z5dgdh„Z6didj„Z7dkdl„Z8dmdn„Z9dodp„Z:e;ddqœdrds„Zdydz„Z?d{d|„Z@d}d~„ZAdd€„ZBd�d‚„ZCdƒd„„ZDd…d†„ZEd‡dˆ„ZFd‰dŠ„ZGd‹dŒ„ZHd�dŽ„ZId�d�„ZJd‘d’„ZKd“d”„ZLd•d–„ZMd—d˜„ZNd™dš„ZOd›dœ„ZPd�dždŸd d¡œZQeRjSeRjTeRjTeRjTd¢œZUd£d¤„ZVdŸd d¥d¦d§d¨d©dªd«d¬d­d®d¯d°œ ZWeRjXeRjXeRjYeRjYeRjYeRjYeRjZeRjZeRj[eRj\eRj]eRjYeRj^d±œ Z_e`d²ƒZad³d´„Zbdµd¶d·d¸d¹dºd»d¼d½d¾d¿œ ZcdÀdÁ„ZddÂdÃdÄœZeeRjfeRjgdÅœZhdÆdÇ„ZidÈdÉ„ZjdÊdË„ZkdÌdÍ„ZldÎdÏ„ZmdÐdÑ„ZndÒdÓ„ZodÔdÕ„ZpdÖdׄZqdØdÙ„ZrdÚdÛ„ZsdÜdÝ„ZtdÞdß„Zudàdá„Zvdâdã„Zwdädå„Zxdædç„Zydèdé„Zzdêdë„Z{dìdí„Z|dîdï„Z}dðdñ„Z~dòdó„Z‡Z€S)õÚ _Unparserz�Methods in this class recursively traverse an AST and output source code for the abstract syntax; original formatting is disregarded.F©Ú_avoid_backslashescCs(g|_g|_i|_i|_d|_||_dS)Nr)Ú_sourceÚ_bufferÚ _precedencesÚ _type_ignoresÚ_indentr÷)r�r÷rrrrº®s  z_Unparser.__init__cCsJt|ƒ}z|t|ƒƒWn tyYdSw|D] }|ƒ||ƒqdS)z7Call f on each item in seq, calling inter() in between.N)ÚiterràÚ StopIteration)r�ZinterÚfÚseqrSrrrÚ interleave¶s ÿ þz_Unparser.interleavecs@t|ƒdkr||dƒˆ d¡dSˆ ‡fdd„||¡dS)z§Traverse and separate the given *items* with a comma and append it to the buffer. If *items* is a single item sequence, a trailing comma will be added.rLrú,có ˆ d¡S©NrO©Úwriterr²rrÚÊó z&_Unparser.items_view..N)r<rr)r�Z traverserr¤rr²rÚ items_viewÂs  z_Unparser.items_viewcCs|jr | d¡dSdS)z8Adds a newline if it isn't the start of generated sourcerMN)rørr²rrrÚ maybe_newlineÌsÿz_Unparser.maybe_newlinerNcCs | ¡| d|j|¡dS)zXIndent a piece of text and append it, according to the current indentation levelz N)r rrü©r�r‡rrrÚfillÑsz_Unparser.fillcCs|j |¡dS)zAppend a piece of textN)rørZr rrrr×sz_Unparser.writecCs|j |¡dSr#)rùrZr rrrÚ buffer_writerÛóz_Unparser.buffer_writercCsd |j¡}|j ¡|S)NrN)r^rùÚclearr¶rrrÚbufferÞs  z_Unparser.bufferN©Úextraccs@�| d¡|r | |¡|jd7_dV|jd8_dS)aA context manager for preparing the source for blocks. It adds the character':', increases the indentation on enter and decreases the indentation on exit. If *extra* is given, it will be directly appended after the colon character. ú:rLN)rrü)r�rrrrÚblockäs€  z_Unparser.blockccs �| |¡dV| |¡dS)z‡A context manager for preparing the source for expressions. It adds *start* to the buffer and enters, after exit it adds *end*.Nr)r�ÚstartÚendrrrÚdelimitòs€ z_Unparser.delimitcCs|r| ||¡StƒSr#)rr)r�rrÚ conditionrrrÚ delimit_ifûs z_Unparser.delimit_ifcCs| dd| |¡|k¡S)z,Shortcut to adding precedence related parensú(ú))rÚget_precedence)r�Ú precedencerrrrÚrequire_parenssz_Unparser.require_parenscCs|j |tj¡Sr#)rúr£rÞrã©r�rrrrrrz_Unparser.get_precedencecGs|D]}||j|<qdSr#)rú)r�rZnodesrrrrÚset_precedences ÿz_Unparser.set_precedencecCsdt|ttttfƒrt|jƒdkrdS|jd}t|tƒsdS|j}t|t ƒr.t|jt ƒr0|SdSdS)z«If a docstring node is found in the body of the *node* parameter, return that docstring node, None otherwise. Logic mirrored from ``_PyAST_GetDocString``.rLNr) r rr€r�r‚r<rIrƒr&r$rGrrrrÚget_raw_docstring s ÿ  ÿz_Unparser.get_raw_docstringcCs*|j |j¡p |j}|durd|›�SdS)Nz # type: )rûr£rÚ type_comment)r�rZcommentrrrÚget_type_comments ÿz_Unparser.get_type_commentcs2t|tƒr|D]}| |¡qdStƒ |¡dSr#)r r5ÚtraverseÚsuperr )r�rr~©r\rrr$!s  ÿz_Unparser.traversecCsg|_| |¡d |j¡S)z‚Outputs a source code string that, if converted back to an ast (using ast.parse) will generate an AST equivalent to *node*rN)rør$r^rrrrr +s  z_Unparser.visitcCs@| |¡}r| |¡| |jdd…¡dS| |j¡dSrß)r!Ú_write_docstringr$rI)r�rZ docstringrrrÚ"_write_docstring_and_traverse_body2s z,_Unparser._write_docstring_and_traverse_bodycCs*dd„|jDƒ|_| |¡|j ¡dS)NcSsi|] }|jd|j›�“qS)Úignore)rÚtag)rRr)rrrÚ :sÿÿz*_Unparser.visit_Module..)Ú type_ignoresrûr(rrrrrÚ visit_Module9s þ z_Unparser.visit_Modulecs`ˆ dd¡�ˆ ‡fdd„ˆj|j¡Wdƒn1swYˆ d¡ˆ |j¡dS)Nrrcrrrrr²rrrDrz._Unparser.visit_FunctionType..ú -> )rrr$ÚargtypesrÚreturnsrrr²rÚvisit_FunctionTypeAsÿÿ z_Unparser.visit_FunctionTypecCs(| ¡| tj|j¡| |j¡dSr#)r r rÞrâr&r$rrrrÚ visit_ExprJsz_Unparser.visit_ExprcCsj| tj|¡�$| tj|j|j¡| |j¡| d¡| |j¡WdƒdS1s.wYdS)Nz := ) rrÞrár ròÚtargetr&r$rrrrrÚvisit_NamedExprOs   "üz_Unparser.visit_NamedExprcó(ˆ d¡ˆ ‡fdd„ˆj|j¡dS)Nzimport crrrrr²rrrXrz(_Unparser.visit_Import..)r rr$Únamesrrr²rÚ visit_ImportVó z_Unparser.visit_ImportcsXˆ d¡ˆ d|jp d¡|jrˆ |j¡ˆ d¡ˆ ‡fdd„ˆj|j¡dS)Nzfrom Ú.rz import crrrrr²rrr`rz,_Unparser.visit_ImportFrom..)r rrUÚmodulerr$r6rrr²rÚvisit_ImportFromZs   z_Unparser.visit_ImportFromcCsT| ¡|jD] }| |¡| d¡q| |j¡| |¡}r(| |¡dSdS)Nú = )r Útargetsr$rr&r#)r�rr3r"rrrÚ visit_Assignbs    ÿz_Unparser.visit_AssigncCsB| ¡| |j¡| d|j|jjjd¡| |j¡dS)Nrhz= ) r r$r3rÚbinopr,r\r]r&rrrrÚvisit_AugAssignks z_Unparser.visit_AugAssigncCsŒ| ¡| dd|j ot|jtƒ¡�| |j¡Wdƒn1s$wY| d¡| |j¡|j rD| d¡| |j ¡dSdS)Nrrrr<) r rrdr r3r8r$rÚ annotationr&rrrrÚvisit_AnnAssignqs ÿ   þz_Unparser.visit_AnnAssigncCs.| d¡|jr| d¡| |j¡dSdS)NÚreturnrh)r r&rr$rrrrÚ visit_Return{s  þz_Unparser.visit_ReturncCó| d¡dS)NÚpass©r rrrrÚ visit_Pass�óz_Unparser.visit_PasscCrE)NÚbreakrGrrrrÚ visit_Break„rIz_Unparser.visit_BreakcCrE)NÚcontinuerGrrrrÚvisit_Continue‡rIz_Unparser.visit_Continuecr5)Nzdel crrrrr²rrrŒrz(_Unparser.visit_Delete..)r rr$r=rrr²rÚ visit_DeleteŠr8z_Unparser.visit_DeletecCs:| d¡| |j¡|jr| d¡| |j¡dSdS)Nzassert rO)r r$Útestr rrrrrÚ visit_AssertŽs   þz_Unparser.visit_Assertcr5)Nzglobal crrrrr²rrr—rz(_Unparser.visit_Global..©r rrr6rrr²rÚ visit_Global•r8z_Unparser.visit_Globalcr5)Nz nonlocal crrrrr²rrr›rz*_Unparser.visit_Nonlocal..rQrrr²rÚvisit_Nonlocal™r8z_Unparser.visit_NonlocalcCóz| tj|¡�,| d¡|jr+| d¡| tj|j¡| |j¡WdƒdSWdƒdS1s6wYdS)NÚawaitrh)rrÞrñrr&r ròr$rrrrÚ visit_Await�ó  û"þz_Unparser.visit_AwaitcCrT)NÚyieldrh)rrÞrârr&r ròr$rrrrÚ visit_Yield¥rWz_Unparser.visit_YieldcCsh| tj|¡�#| d¡|jstdƒ‚| tj|j¡| |j¡WdƒdS1s-wYdS)Nz yield from z-Node can't be used without a value attribute.) rrÞrârr&rr ròr$rrrrÚvisit_YieldFrom­s "ûz_Unparser.visit_YieldFromcCs\| d¡|js|jrtdƒ‚dS| d¡| |j¡|jr,| d¡| |j¡dSdS)NÚraisez*Node can't use cause without an exception.rhz from )r ÚexcÚcauserrr$rrrrÚ visit_Raiseµs    þz_Unparser.visit_RaisecCsæ| d¡| ¡�| |j¡Wdƒn1swY|jD]}| |¡q"|jrL| d¡| ¡�| |j¡Wdƒn1sGwY|jrq| d¡| ¡�| |j¡WdƒdS1sjwYdSdS)NÚtryÚelseÚfinally)r rr$rIÚhandlersÚorelseÚ finalbody)r�rZexrrrÚ visit_TryÁs"  ÿ    ÿ  "ÿþz_Unparser.visit_TrycCs|| d¡|jr| d¡| |j¡|jr!| d¡| |j¡| ¡�| |j¡WdƒdS1s7wYdS)NÚexceptrhú as )r r%rr$rcrrIrrrrÚvisit_ExceptHandlerÐs      "ÿz_Unparser.visit_ExceptHandlercCs| ¡|jD] }| d¡| |¡q| d|j¡|jdd|jp%|jd��4d}|jD]}|r8| d¡nd}| |¡q.|jD]}|rM| d¡nd}| |¡qCWdƒn1s_wY|  ¡�|  |¡WdƒdS1sywYdS) Nú@zclass rr)rFrOT) r Údecorator_listr r$rcrÚbasesr;rrr()r�rÚdecoÚcommaÚerrrÚvisit_ClassDefÛs,         ûø  "ÿz_Unparser.visit_ClassDefcCó| |d¡dS)NÚdef©Ú_function_helperrrrrÚvisit_FunctionDefórz_Unparser.visit_FunctionDefcCrp)Nz async defrrrrrrÚvisit_AsyncFunctionDeförz _Unparser.visit_AsyncFunctionDefcCsÖ| ¡|jD] }| d¡| |¡q|d|j}| |¡| dd¡�| |j¡Wdƒn1s7wY|jrJ| d¡| |j¡|j |  |¡d��|  |¡WdƒdS1sdwYdS)Nrirhrrr.r) r rjr r$rcrr:r0rrr#r()r�rZ fill_suffixrlZdef_strrrrrsùs    ÿ   "ÿz_Unparser._function_helpercCó| d|¡dS)Nzfor ©Ú _for_helperrrrrÚ visit_Forrz_Unparser.visit_ForcCrv)Nz async for rwrrrrÚvisit_AsyncFor rz_Unparser.visit_AsyncForcCs¸| |¡| |j¡| d¡| |j¡|j| |¡d��| |j¡Wdƒn1s0wY|jrZ| d¡| ¡�| |j¡WdƒdS1sSwYdSdS)Nú in rr`) r r$r3rrýrr#rIrc)r�r rrrrrxs    ÿ  "ÿþz_Unparser._for_helpercCs4| d¡| |j¡| ¡�| |j¡Wdƒn1s wY|jrst|jƒdkrst|jdtƒrs|jd}| d¡| |j¡| ¡�| |j¡Wdƒn1s\wY|jrst|jƒdkrst|jdtƒs7|jr˜| d¡| ¡�| |j¡WdƒdS1s‘wYdSdS)Nzif rLrzelif r`) r r$rOrrIrcr<r ZIfrrrrÚvisit_Ifs&   ÿ$    ÿ$ü  "ÿþz_Unparser.visit_IfcCs˜| d¡| |j¡| ¡�| |j¡Wdƒn1s wY|jrJ| d¡| ¡�| |j¡WdƒdS1sCwYdSdS)Nzwhile r`)r r$rOrrIrcrrrrÚ visit_While,s   ÿ  "ÿþz_Unparser.visit_Whilecóhˆ d¡ˆ ‡fdd„ˆj|j¡ˆjˆ |¡d��ˆ |j¡WdƒdS1s-wYdS)Nzwith crrrrr²rrr8rz&_Unparser.visit_With..r©r rr$r¤rr#rIrrr²rÚ visit_With6ó "ÿz_Unparser.visit_Withcr~)Nz async with crrrrr²rrr>rz+_Unparser.visit_AsyncWith..rrrrr²rÚvisit_AsyncWith<r�z_Unparser.visit_AsyncWith©Ú quote_typesÚescape_special_whitespacecs·fdd„}d t|ˆƒ¡‰|}dˆvrdd„|Dƒ}‡fdd„|Dƒ}|sAtˆƒ‰t‡fdd „|Dƒˆd ƒ}ˆd d …|gfSˆrc|j‡fd d„d�|d d ˆd krcˆdd …dˆd ‰ˆ|fS)z‹Helper for writing string literals, minimizing escapes. Returns the tuple (string literal to write, possible quote types). cs4ˆs|dvr|S|dks| ¡s| d¡ d¡S|S)Nz ú\Zunicode_escapeÚascii)Ú isprintabler‘r’)rŒ)r…rrÚ escape_charHs z2_Unparser._str_literal_helper..escape_charrNrMcSsg|]}|tvr|‘qSr)Ú _MULTI_QUOTES©rRÚqrrrÚ Uóz1_Unparser._str_literal_helper..csg|]}|ˆvr|‘qSrrr‹©Úescaped_stringrrr�VrŽc3s �|] }ˆd|vr|VqdSrQrr‹)ÚstringrrrV\s€z0_Unparser._str_literal_helper..rrLr cs|dˆdkS)Nrr r)rŒr�rrr`sz/_Unparser._str_literal_helper..)rÂNr†)r^r3r_ràÚsort)r�r‘r„r…r‰Zpossible_quotesZquoter)r…r�r‘rÚ_str_literal_helperBs  z_Unparser._str_literal_helper©r„cCs4|j||d�\}}|d}| |›|›|›�¡dS)zKWrite string literal value with a best effort attempt to avoid backslashes.r”rN)r“r)r�r‘r„Ú quote_typerrrÚ_write_str_avoiding_backslasheshsz)_Unparser._write_str_avoiding_backslashesc CsÔ| d¡|jr| ||j¡| |j¡dSg}|jD]}t|dt|ƒj ƒ}|||jƒ|  |jt |t ƒf¡qg}t }|D]\}}|j|||d�\}}|  |¡q@d |¡}|d}| |›|›|›�¡dS)NrÿÚ _fstring_rƒrNr)rr÷Ú_fstring_JoinedStrr r–rr>rr%r]rZr r$Ú _ALL_QUOTESr“r^) r�rrr&ÚmethZ new_bufferr„Z is_constantr•rrrÚvisit_JoinedStrns*      þ  z_Unparser.visit_JoinedStrcCs(| d¡| ||j¡| |j¡dS)Nrÿ)rÚ_fstring_FormattedValuer r–rrrrrÚvisit_FormattedValue�s z_Unparser.visit_FormattedValuecCs.|jD]}t|dt|ƒjƒ}|||ƒqdS)Nr—)r>rr%r])r�rrr&ršrrrr˜’s  þz_Unparser._fstring_JoinedStrcCs6t|jtƒs tdƒ‚|j dd¡ dd¡}||ƒdS)Nz.Constants inside JoinedStr should be a string.ú{z{{ú}z}})r r&rGrÚreplace)r�rrr&rrrÚ_fstring_Constant—s  z_Unparser._fstring_ConstantcCsÎ|dƒt|ƒdd�}| tj ¡|j¡| |j¡}| d¡r$|dƒd|vr,tdƒ‚||ƒ|j dkrIt |j ƒ}|dvrBtd ƒ‚|d |›�ƒ|j ra|d ƒt |d t|j ƒj ƒ}||j |ƒ|d ƒdS)NržTrörhr†z5Unable to avoid backslash in f-string expression partr ZsrazUnknown f-string conversion.ú!rr—rŸ)r%r rÞrãràr&r rorÚ conversionÚchrÚ format_specrr])r�rrÚunparserÚexprr£ršrrrrœ�s&      z!_Unparser._fstring_FormattedValuecCó| |j¡dSr#)rr9rrrrÚ visit_Name²rz_Unparser.visit_NamecCs0| ¡|jdkr| d¡|j|jtd�dS)NÚur”)r Úkindrr–r&rŠrrrrr'µs  z_Unparser._write_docstringc Csnt|ttfƒr| t|ƒ dt¡ ddt›dt›d�¡¡dS|jr.t|tƒr.|  |¡dS| t|ƒ¡dS)NÚinfÚnanrú-r) r r(r)rr_r Ú_INFSTRr÷rGr–r¶rrrÚ_write_constant»sýz_Unparser._write_constantcCsŠ|j}t|tƒr(| dd¡�| |j|¡WdƒdS1s!wYdS|dur3| d¡dS|jdkr=| d¡| |j¡dS)Nrr.ú...rª)r&r rrr r°rr«)r�rr&rrrr¨És "ÿ  z_Unparser.visit_ConstantcóLˆ dd¡�ˆ ‡fdd„ˆj|j¡WdƒdS1swYdS)Nú[ú]crrrrr²rrr×rz&_Unparser.visit_List..)rrr$r4rrr²rÚ visit_ListÕs"ÿz_Unparser.visit_ListcCóT| dd¡�| |j¡|jD]}| |¡qWdƒdS1s#wYdS)Nr³r´©rr$ÚeltÚ generators©r�rÚgenrrrÚvisit_ListCompÙó    ÿ"þz_Unparser.visit_ListCompcCr¶©Nrrr·rºrrrÚvisit_GeneratorExpßr½z_Unparser.visit_GeneratorExpcCr¶)NržrŸr·rºrrrÚ visit_SetCompår½z_Unparser.visit_SetCompcCsj| dd¡�%| |j¡| d¡| |j¡|jD]}| |¡qWdƒdS1s.wYdS)NržrŸr)rr$rÂrr&r¹rºrrrÚvisit_DictCompës     ÿ"üz_Unparser.visit_DictCompcCs�|jr | d¡n| d¡| tj|j¡| |j¡| d¡|jtj ¡|j g|j ¢RŽ| |j ¡|j D] }| d¡| |¡q9dS)Nz async for z for r{ú if ) Úis_asyncrr rÞrár3r$rãràrýÚifs)r�rZ if_clauserrrÚvisit_comprehensionós        þz_Unparser.visit_comprehensioncCs”| tj|¡�9| tj ¡|j|j¡| |j¡| d¡| |j¡| d¡| tj|j ¡| |j ¡WdƒdS1sCwYdS)NrÂz else ) rrÞrãr ràrIrOr$rrcrrrrÚ visit_IfExps    "ùz_Unparser.visit_IfExpcs`|jr)ˆ dd¡�ˆ ‡fdd„ˆj|j¡WdƒdS1s"wYdSˆ d¡dS)NržrŸcrrrrr²rrrrz%_Unparser.visit_Set..z{*()})r4rrr$rrrr²rÚ visit_Set s "ÿz_Unparser.visit_Setcsl‡fdd„‰‡‡fdd„}ˆ dd¡�ˆ ‡fdd„|t|j|jƒ¡WdƒdS1s/wYdS) Ncs"ˆ |¡ˆ d¡ˆ |¡dS©Nr©r$r)ÚkÚvr²rrÚwrite_key_value_pairs  z2_Unparser.visit_Dict..write_key_value_paircsD|\}}|durˆ d¡ˆ tj|¡ˆ |¡dSˆ||ƒdS)Nú**)rr rÞrèr$)r~rÊrË©r�rÌrrÚ write_items  z(_Unparser.visit_Dict..write_itemržrŸcrrrrr²rrr'rz&_Unparser.visit_Dict..)rrr@r=r>)r�rrÏrrÎrÚ visit_Dicts  ÿ"ÿz_Unparser.visit_DictcCsB| dd¡�| |j|j¡WdƒdS1swYdSr¾)rr r$r4rrrrÚ visit_Tuple*s"ÿz_Unparser.visit_Tupleú~Únotú+r®)ZInvertZNotr-r.)rÓrÒrÔr®cCs„|j|jjj}|j|}| ||¡�%| |¡|tjur#| d¡|  ||j ¡|  |j ¡WdƒdS1s;wYdS©Nrh) Úunopr,r\r]Úunop_precedencerrrÞrïr r/r$)r�rÚoperatorÚoperator_precedencerrrÚ visit_UnaryOp6s    "ùz_Unparser.visit_UnaryOprriú/ú%ú<<ú>>ú|ú^ú&ú//rÍ) rArBZMultZMatMultZDivZModZLShiftZRShiftZBitOrZBitXorZBitAndZFloorDivZPow) rÔr®rrirÛrÜrÝrÞrßràrárârÍ)rÍcCs¶|j|jjj}|j|}| ||¡�>||jvr | ¡}|}n|}| ¡}| ||j ¡|  |j ¡|  d|›d�¡| ||j ¡|  |j ¡WdƒdS1sTwYdSrÕ) r?r,r\r]Úbinop_precedencerÚ binop_rassocràr rCr$rrD)r�rrØrÙZleft_precedenceZright_precedencerrrÚ visit_BinOpcs   "ôz_Unparser.visit_BinOpz==z!=úz>=Úiszis notÚinznot in) ZEqZNotEqZLtZLtEZGtZGtEZIsZIsNotZInZNotIncCsœ| tj|¡�=|jtj ¡|jg|j¢RŽ| |j¡t|j |jƒD]\}}|  d|j |j j d¡| |¡q$WdƒdS1sGwYdSrÕ)rrÞrçr ràrCÚ comparatorsr$r@ÚopsrÚcmpopsr\r])r�rÚornrrrÚ visit_Compare�s  þ"ýz_Unparser.visit_CompareÚandÚor)ZAndZOr)rïrðcs€ˆj|jjj}ˆj|‰‡‡fdd„}ˆ ˆ|¡�d|›d�‰ˆ ‡‡fdd„||j¡WdƒdS1s9wYdS)Ncs"ˆ ¡‰ˆ ˆ|¡ˆ |¡dSr#)ràr r$r*)rÙr�rrÚincreasing_level_traverse�s z9_Unparser.visit_BoolOp..increasing_level_traverserhcs ˆ ˆ¡Sr#rr)r…r�rrr˜rz(_Unparser.visit_BoolOp..)Úboolopsr,r\r]Úboolop_precedencerrr>)r�rrØrñr)rÙr…r�rÚ visit_BoolOpŒs  "þz_Unparser.visit_BoolOpcCsZ| tj|j¡| |j¡t|jtƒr t|jjtƒr | d¡| d¡| |j ¡dS)Nrhr9) r rÞròr&r$r r$r'rrrrrrrÚvisit_Attributešs    z_Unparser.visit_AttributecCs¦| tj|j¡| |j¡| dd¡�5d}|jD]}|r$| d¡nd}| |¡q|jD]}|r9| d¡nd}| |¡q/WdƒdS1sLwYdS)NrrFrOT) r rÞròr7r$rr:rr;)r�rrmrnrrrÚ visit_Call¥s        û"øz_Unparser.visit_CallcCs�dd„}| tj|j¡| |j¡| dd¡�&||jƒr(| |j|jj¡n| |j¡WdƒdSWdƒdS1sAwYdS)NcSs&t|tƒo|jotdd„|jDƒƒ S)Ncss�|]}t|tƒVqdSr#)r ZStarred)rRr¸rrrrV¿s€zE_Unparser.visit_Subscript..is_simple_tuple..)r r2r4Úany)Z slice_valuerrrÚis_simple_tuple¸s ÿýz2_Unparser.visit_Subscript..is_simple_tupler³r´) r rÞròr&r$rrÐr r4)r�rrørrrÚvisit_Subscript·s  ü"þz_Unparser.visit_SubscriptcCs*| d¡| tj|j¡| |j¡dS)Nr)rr rÞrèr&r$rrrrÚ visit_StarredÊs z_Unparser.visit_StarredcCrE)Nr±rrrrrÚvisit_EllipsisÏrIz_Unparser.visit_EllipsiscCsR|jr | |j¡| d¡|jr| |j¡|jr'| d¡| |j¡dSdS)Nr)Úlowerr$rÚupperÚsteprrrrÚ visit_SliceÒs    þz_Unparser.visit_SlicecCsZ| d¡| |j¡| ¡�|jD]}| |¡qWdƒdS1s&wYdS)Nzmatch )r r$ÚsubjectrÚcases)r�rÚcaserrrÚ visit_MatchÜs     ÿ"ÿz_Unparser.visit_MatchcCs0| |j¡|jr| d¡| |j¡dSdSrÈ)rÚargrAr$rrrrÚ visit_argãó  þz_Unparser.visit_argc Csžd}|j|j}dgt|ƒt|jƒ|j}tt||ƒdƒD]/\}}|\}}|r,d}n| d¡| |¡|rB| d¡| |¡|t|jƒkrN| d¡q|jsU|j r~|rZd}n| d¡| d¡|jr~| |jj ¡|jj r~| d¡| |jj ¡|j r£t|j |j ƒD]\}}| d¡| |¡|r¢| d¡| |¡qˆ|j rË|r«d}n| d¡| d |j j ¡|j j rÍ| d¡| |j j ¡dSdSdS) NTrLFrOú=z, /rrrÍ)Ú posonlyargsr:r<ÚdefaultsÚ enumerater@rr$ÚvarargÚ kwonlyargsrrAÚ kw_defaultsÚkwarg) r�rr”Zall_argsr r¿ÚelementsÚaÚdrrrÚvisit_argumentsésV      €        €  øz_Unparser.visit_argumentscCs<|jdur | d¡n | |j¡| d¡| |j¡dS)NrÍr)rrr$r&rrrrÚ visit_keywords    z_Unparser.visit_keywordcCsp| tj|¡�'| d¡| |j¡| d¡| tj|j¡| |j¡WdƒdS1s1wYdS)Nzlambda r)rrÞrãrr$r:r rIrrrrÚ visit_Lambda$s   "ûz_Unparser.visit_LambdacCs*| |j¡|jr| d|j¡dSdS©Nrg)rrcÚasnamerrrrÚ visit_alias,s ÿz_Unparser.visit_aliascCs0| |j¡|jr| d¡| |j¡dSdSr)r$Ú context_exprÚ optional_varsrrrrrÚvisit_withitem1rz_Unparser.visit_withitemcCsl| d¡| |j¡|jr| d¡| |j¡| ¡�| |j¡WdƒdS1s/wYdS)Nzcase rÂ)r r$ÚpatternÚguardrrrIrrrrÚvisit_match_case7s     "ÿz_Unparser.visit_match_casecCr¨r#)r$r&rrrrÚvisit_MatchValue@rz_Unparser.visit_MatchValuecCr¨r#)r°r&rrrrÚvisit_MatchSingletonCrz_Unparser.visit_MatchSingletoncr²)Nr³r´crrrrr²rrrIrz/_Unparser.visit_MatchSequence..)rrr$Úpatternsrrr²rÚvisit_MatchSequenceFs ÿ"ÿz_Unparser.visit_MatchSequencecCs&|j}|dur d}| d|›�¡dS)NÚ_r)rcr)r�rrcrrrÚvisit_MatchStarLsz_Unparser.visit_MatchStarc s¢‡fdd„}ˆ dd¡�;|j}ˆ ‡fdd„|t||jdd�¡|j}|dur?|r/ˆ d ¡ˆ d |›�¡WdƒdSWdƒdS1sJwYdS) Ncs*|\}}ˆ |¡ˆ d¡ˆ |¡dSrÈrÉ)ÚpairrÊÚpr²rrÚwrite_key_pattern_pairSs  z<_Unparser.visit_MatchMapping..write_key_pattern_pairržrŸcrrrrr²rrr\rz._Unparser.visit_MatchMapping..T©ÚstrictrOrÍ)rr=rr@r Úrestr)r�rr&r=r)rr²rÚvisit_MatchMappingRs  ý õ"øz_Unparser.visit_MatchMappingc sˆ tj|j¡ˆ |j¡ˆ dd¡�C|j}ˆ ‡fdd„ˆj|¡|j}|rO‡fdd„}|r6ˆ  d¡ˆ ‡fdd„|t ||j d d �¡WdƒdSWdƒdS1sZwYdS) Nrrcrrrrr²rrrlrz,_Unparser.visit_MatchClass..cs&|\}}ˆ |›d�¡ˆ |¡dS)Nr)rr$)r$rrrr²rrÚwrite_attr_patternpsz6_Unparser.visit_MatchClass..write_attr_patternrOcrrrrr²rrrxrTr') r rÞròrbr$rr rÚ kwd_attrsrr@Ú kwd_patterns)r�rr Zattrsr+rr²rÚvisit_MatchClassfs( ÿ   ýò"úz_Unparser.visit_MatchClasscCsœ|j}|j}|dur| d¡dS|dur| |j¡dS| tj|¡� | tj|j¡| |j¡| d|j›�¡WdƒdS1sGwYdS)Nr"rg) rcrrrrÞrãr rér$)r�rrcrrrrÚ visit_MatchAs}s "ýz_Unparser.visit_MatchAscshˆ tj|¡�#ˆjtj ¡g|j¢RŽˆ ‡fdd„ˆj|j¡WdƒdS1s-wYdS)Ncr)Nz | rrr²rrr�rz)_Unparser.visit_MatchOr..)rrÞrér ràr rr$rrr²rÚ visit_MatchOrŠs"þz_Unparser.visit_MatchOr)rN)�r]r©rªr«rºrr r r rr Úpropertyrrrrrrrr r!r#r$r r(r-r1r2r4r7r;r>r@rBrDrHrKrMrNrPrRrSrVrYrZr^rerhrortrursryrzrxr|r}r€r‚r™r“r–r›r�r˜r¡rœr©r'r°r¨rµr¼r¿rÀrÁrÅrÆrÇrÐrÑrÖrÞrærïr×rÚr?rírîrìrérêrërðrãÚ frozenseträrårìrîròrårärórôrõrörùrúrûrÿrrrrrrrrrrr!r#r*r.r/r0Ú __classcell__rrr&rrõ©s4              ÿ&   ü óóö   3  rõcCstƒ}| |¡Sr#)rõr )Zast_objr¦rrrÚunparse�s r4cCsäddl}|jdd�}|jd|jdd�ddd d �|jd d d ddd�|jddddd�|jddddd�|jddtddd�| ¡}|j� }| ¡}Wdƒn1sTwYt||jj |j |j d �}t t ||j|jd!�ƒdS)"Nrz python -m ast)ÚprogÚinfileÚrbrú?r®z$the file to parse; defaults to stdin)r%ÚnargsÚdefaultÚhelpz-mz--moder)rZsinglerZ func_typez(specify what kind of code must be parsed)r:Úchoicesr;z--no-type-commentsTZ store_falsez)don't add information about type comments)r:Úactionr;z-az--include-attributesÚ store_truez:include attributes such as line numbers and column offsets)r=r;z-iz--indentrPz'indentation of nodes (number of spaces))r%r:r;)r )rgrK)ÚargparseÚArgumentParserÚ add_argumentZFileTyper'Ú parse_argsr6ÚreadrrcrZno_type_commentsÚprintrjrgrK)r?Úparserr:r6rZtreerrrÚmain”s2 þ þ ÿ ÿ ÿ ÿrFÚ__main__)rr)TF)rL)T)Kr«ÚsysZ_astÚ contextlibrrÚenumrrrrJrjrsrxr{r}rtrˆr�r�r•ryÚobjectršr­rnr$r³r·r1rzr…r%r¹rÄrÆr„rËrÌrÎr'r(r)rGÚbytesÚboolr»r¼r¢rWrÐrÒrÔr2r×rØrÕÚmodrÙZ expr_contextrÛrÜrÝr_Ú float_infoÚ max_10_expr¯rÞZ_SINGLE_QUOTESrŠr™rõr4rFr]rrrrÚs  ÿ;C #  %: <      ûÿø   m  ÿ