Your IP : 3.21.46.129


Current Path : /opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/lib2to3/fixes/__pycache__/fix_exitfunc.cpython-311.pyc

�

c��f�	��`�dZddlmZmZddlmZmZmZmZm	Z	m
Z
Gd�dej��ZdS)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�B��tt|��j|�dS�N)�superr�__init__)�self�args�	__class__s  ��A/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_exitfunc.pyrzFixExitfunc.__init__s#���)��k�4� � �)�4�0�0�0�0�c�h��tt|���||��d|_dSr)rr�
start_tree�
sys_import)r�tree�filenamers   �rrzFixExitfunc.start_tree!s.���
�k�4� � �+�+�D�(�;�;�;�����rc	��d|vr|j�
|d|_dS|d���}d|_tjt
jttd��td������}t||g|j��}|�
|��|j�|�|d��dS|jjd}|j
t
jkrF|�t!����|�tdd����dS|jj}|j�|j��}|j}	tjt
jtd	��tdd��g��}
tjt
j|
g��}|�|dzt-����|�|d
z|��dS)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����F��v��$�$�&�&������;�t�z�#�D��N�N�D��4D�4D�E�E�!�!���H�t�f�d�k�2�2�����T�����?�"��L�L�� ?�
@�
@�
@��F���(��+���:��-�-�-����u�w�w�'�'�'����t�H�c�2�2�3�3�3�3�3�"�o�4�O�&�/�5�5�d�o�F�F�H�,�3�N���T�%5�#�H�~�~�t�H�c�/B�/B�C� � �J��+�d�.���=�=�C��(�(��A��w�y�y�A�A�A��(�(��A��s�;�;�;�;�;r)
�__name__�
__module__�__qualname__�keep_line_order�
BM_compatible�PATTERNrrr<�
__classcell__)rs@rrrsq��������O��M�
�G�1�1�1�1�1������#<�#<�#<�#<�#<�#<�#<rrN)
�__doc__�lib2to3rr�lib2to3.fixer_utilrrrrr	r
�BaseFixr�rr�<module>rIs�����'�&�&�&�&�&�&�&�E�E�E�E�E�E�E�E�E�E�E�E�E�E�E�E�=<�=<�=<�=<�=<�*�$�=<�=<�=<�=<�=<r

?>