f ž _¡c@s:dZddlmZmZddlmZmZGdd„dejƒZdS)z: Optional fixer to transform set() calls to set literals. i)Ú 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ÚitemsZ{css|]}| ¡VqdS)N)Úclone)Z.0Ún©r ú6/usr/lib64/python3.10/lib2to3/fixes/fix_set_literal.pyZ 'sz*FixSetLiteral.transform..Z}iÿÿÿÿii)ZgetrZNoderZ listmakerrZreplaceZLeafrZLBRACEZextendZchildrenZappendZRBRACEZ next_siblingZprefixZ dictsetmakerZlenZremove) ZselfZnodeZresultsrZfakerZliteralZmakerrr r r Ú transforms"   zFixSetLiteral.transformN)Z__name__Z __module__Z __qualname__Z BM_compatibleZexplicitZPATTERNr r r r r r s rN) Z__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr r r r Zs