관리-도구
편집 파일: fix_exitfunc.cpython-39.pyc
a �����DOg� ����������������������@���sJ���d�Z�ddlmZmZ�ddlmZmZmZmZm Z m Z �G�dd��dej�ZdS�)z7 Convert use of sys.exitfunc to use the atexit module. �����)�pytree� fixer_base)�Name�Attr�Call�Comma�Newline�symsc�����������������������s<���e�Zd�ZdZdZdZ��fdd�Z��fdd�Zdd��Z���Z S�) �FixExitfuncTa��� ( sys_import=import_name<'import' ('sys' | dotted_as_names< (any ',')* 'sys' (',' any)* > ) > | expr_stmt< power< 'sys' trailer< '.' 'exitfunc' > > '=' func=any > ) c��������������������s���t�t|��j|���d�S��N)�superr ����__init__)�self�args�� __class__���2/usr/lib64/python3.9/lib2to3/fixes/fix_exitfunc.pyr ������s����zFixExitfunc.__init__c��������������������s���t�t|���||��d�|�_d�S�r���)r���r ���� start_tree� sys_import)r���Ztree�filenamer���r���r���r���!���s����zFixExitfunc.start_treec�����������������C���s&��d|v�r |�j�d�u�r|d�|�_�d�S�|d����}d|_t�tjttd�td���}t ||g|j�}|� |��|�j�d�u�r�|��|d��d�S�|�j�jd�}|j tjkr�|�t����|�tdd���nj|�j�j}|j�|�j��}|j} t�tjtd �tdd�g�} t�tj| g�}|�|d�t����|�|d �|��d�S�)Nr����func���atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.����� �import����)r���Zclone�prefixr���ZNoder ���Zpowerr���r���r����replace�warningZchildren�typeZdotted_as_namesZappend_childr����parent�indexZimport_nameZsimple_stmtZinsert_childr���)r���Znode�resultsr���r����call�namesZcontaining_stmtZpositionZstmt_containerZ new_import�newr���r���r���� transform%���s6���� � �zFixExitfunc.transform) �__name__� __module__�__qualname__Zkeep_line_orderZ BM_compatibleZPATTERNr ���r���r)���� __classcell__r���r���r���r���r ������s���r ���N) �__doc__Zlib2to3r���r���Zlib2to3.fixer_utilr���r���r���r���r���r ���ZBaseFixr ���r���r���r���r����<module>���s���