AlkantarClanX12

Your IP : 18.116.15.22


Current Path : /opt/alt/python310/lib64/python3.10/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/lib2to3/fixes/__pycache__/fix_set_literal.cpython-310.pyc

o

6��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�}|rt�tj|��g�}|�|�|}n|d}t�tj	d�g}|�
dd�|jD��|�t�tj
d��|jj|d_t�tj|�}|j|_t|j�dkrc|jd	}|��|j|jd_|S)
N�single�items�{css�|]}|��VqdS)N)�clone)�.0�n�r
�D/opt/alt/python310/lib64/python3.10/lib2to3/fixes/fix_set_literal.py�	<genexpr>'s�z*FixSetLiteral.transform.<locals>.<genexpr>�}�����)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extend�children�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�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�<module>s