AlkantarClanX12

Your IP : 18.118.193.28


Current Path : /opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/lib2to3/fixes/__pycache__/fix_set_literal.cpython-312.pyc

�

�Q�f���R�dZddlmZmZddlmZmZGd�dej�Zy)z:
Optional fixer to transform set() calls to set literals.
�)�
fixer_base�pytree)�token�symsc��eZdZdZdZdZd�Zy)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c��|jd�}|rGtjtj|j�g�}|j
|�|}n|d}tjtjd�g}|jd�|jD��|jtjtjd��|jj|d_tjtj |�}|j|_t#|j�dk(r=|jd}|j%�|j|jd_|S)	N�single�items�{c3�<K�|]}|j����y�w)N)�clone)�.0�ns  �D/opt/alt/python312/lib64/python3.12/lib2to3/fixes/fix_set_literal.py�	<genexpr>z*FixSetLiteral.transform.<locals>.<genexpr>'s����9�.�Q�q�w�w�y�.�s��}�����)�getr�Noder�	listmakerr�replace�Leafr�LBRACE�extend�children�append�RBRACE�next_sibling�prefix�dictsetmaker�len�remove)	�self�node�resultsr
�faker�literal�makerrs	         r�	transformzFixSetLiteral.transforms�����X�&����;�;�t�~�~�����/?�@�D��N�N�4� ��E��G�$�E��;�;�u�|�|�S�1�2�����9�%�.�.�9�9����v�{�{�5�<�<��5�6�"�/�/�6�6��������D�-�-�w�7���{�{����u�~�~��!�#����q�!�A�
�H�H�J�()���E�N�N�2��%���N)�__name__�
__module__�__qualname__�
BM_compatible�explicit�PATTERNr,�r-rrrs���M��H��G�r-rN)	�__doc__�lib2to3rr�lib2to3.fixer_utilrr�BaseFixrr4r-r�<module>r9s$���'�*�)�J�&�&�)r-