f ž _¡ã@s:dZddlmZmZddlmZmZGdd„dejƒZdS)z: Optional fixer to transform set() calls to set literals. é)Ú fixer_baseÚpytree)ÚtokenÚsymsc@s eZdZdZdZdZdd„ZdS)Ú FixSetLiteralTajpower< 'set' trailer< '(' (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) > | single=any) ']' > | atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' > ) ')' > > c CsÊ| d¡}|r2t tj| ¡g¡}| |¡|}n|d}t tj d¡g}|  dd„|j Dƒ¡|  t tj d¡¡|jj|d_t tj|¡}|j|_t|j ƒdkrÆ|j d }| ¡|j|j d_|S) NÚsingleÚitemsÚ{css|]}| ¡VqdS)N)Úclone)Ú.0Ún©r ú6/usr/lib64/python3.10/lib2to3/fixes/fix_set_literal.pyÚ 'óz*FixSetLiteral.transform..Ú}éÿÿÿÿéé)ÚgetrZNoderZ listmakerr ÚreplaceZLeafrÚLBRACEÚextendZchildrenÚappendÚRBRACEZ next_siblingÚprefixZ dictsetmakerÚlenÚremove) ÚselfZnodeÚresultsrZfakerÚliteralZmakerr r r rÚ transforms"   zFixSetLiteral.transformN)Ú__name__Ú __module__Ú __qualname__Z BM_compatibleZexplicitZPATTERNr!r r r rr s rN) Ú__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr r r rÚs