AlkantarClanX12

Your IP : 18.117.232.215


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_exitfunc.cpython-312.pyc

�

�Q�f�	��b�dZddlmZmZddlmZmZmZmZm	Z	m
Z
Gd�dej�Zy)z7
Convert use of sys.exitfunc to use the atexit module.
�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symsc�:��eZdZdZdZdZ�fd�Z�fd�Zd�Z�xZ	S)�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              c�&��tt|�
|�y�N)�superr�__init__)�self�args�	__class__s  ��A/opt/alt/python312/lib64/python3.12/lib2to3/fixes/fix_exitfunc.pyrzFixExitfunc.__init__s���
�k�4�)�4�0�c�<��tt|�||�d|_yr)rr�
start_tree�
sys_import)r�tree�filenamers   �rrzFixExitfunc.start_tree!s���
�k�4�+�D�(�;���rc	��d|vr|j�
|d|_y|dj�}d|_tjt
jttd�td���}t||g|j�}|j|�|j�|j|d�y|jjd}|jt
jk(r5|jt!��|jtdd��y|jj"}|jj%|j�}|j"}	tjt
j&td	�tdd�g�}
tjt
j(|
g�}|j+|dzt-��|j+|d
z|�y)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)r�clone�prefixr�Noder
�powerrrr�replace�warning�children�type�dotted_as_names�append_childr�parent�index�import_name�simple_stmt�insert_childr	)r�node�resultsrr�call�names�containing_stmt�position�stmt_container�
new_import�news            r�	transformzFixExitfunc.transform%s����7�"����&�")�,�"7�����v��$�$�&������;�;�t�z�z�#�D��N�D��4D�E�!���H�t�f�d�k�k�2�����T���?�?�"��L�L�� ?�
@�����(�(��+���:�:��-�-�-����u�w�'����t�H�c�2�3�"�o�o�4�4�O�&�/�/�5�5�d�o�o�F�H�,�3�3�N����T�%5�%5�#�H�~�t�H�c�/B�C� �J��+�+�d�.�.���=�C��(�(��A��w�y�A��(�(��A��s�;r)
�__name__�
__module__�__qualname__�keep_line_order�
BM_compatible�PATTERNrrr<�
__classcell__)rs@rrrs#����O��M�
�G�1��#<rrN)
�__doc__�lib2to3rr�lib2to3.fixer_utilrrrrr	r
�BaseFixr�rr�<module>rIs'���'�E�E�=<�*�$�$�=<r