Your IP : 3.137.177.204


Current Path : /lib64/python3.8/lib2to3/fixes/__pycache__/
Upload File :
Current File : //lib64/python3.8/lib2to3/fixes/__pycache__/fix_set_literal.cpython-38.opt-2.pyc

U

e5d��@s6ddlmZmZddlmZmZGdd�dej�ZdS)�)�
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�|jD��|�t�tj
d��|jj|d_t�tj|�}|j|_t|j�dkr�|jd	}|��|j|jd_|S)
N�single�items�{css|]}|��VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.8/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}�����)�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)Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>s

?>