U iÛ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 úB/opt/alt/python38/lib64/python3.8/lib2to3/fixes/fix_set_literal.pyÚ 'sz*FixSetLiteral.transform..Ú}éÿÿÿÿéé)ÚgetrZNoderZ listmakerr ÚreplaceZLeafrÚLBRACEÚextendZchildrenÚappendÚRBRACEZ next_siblingÚprefixZ dictsetmakerÚlenÚremove) ÚselfZnodeZresultsrZfakerÚliteralZmakerr r r rÚ transforms"   zFixSetLiteral.transformN)Ú__name__Ú __module__Ú __qualname__Z BM_compatibleZexplicitZPATTERNrr r r rr s rN) Ú__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr r r rÚs