관리-도구
편집 파일: fix_raise_.cpython-37.pyc
B �A�[� � @ sB d Z ddlmZ ddlmZmZmZmZmZ G dd� dej �Z dS )z�Fixer for raise E(V).with_traceback(T) to: from future.utils import raise_ ... raise_(E, V, T) TODO: FIXME!! � )� fixer_base)�Comma�Node�Leaf�token�symsc @ s e Zd ZdZdd� ZdS )�FixRaisez� raise_stmt< 'raise' (power< name=any [trailer< '(' val=any* ')' >] [trailer< '.' 'with_traceback' > trailer< '(' trc=any ')' >] > | any) ['from' chain=any] >c C s� t |�d�|�d�|�d� }}}|�d�}|d k rV| �|d� |j�� |�� |d k r�|rj|d n ttjd�}d |_|_ttjd �|� � t � |� � t � |� � g}ttj |�}|�|� d S ) N�name�val�trc�chainz8explicit exception chaining is not supported in Python 2r �None� �raise)ZFIXME�get�warningZprev_sibling�remover r �NAME�prefix�cloner r r � raise_stmt�replace) �self�node�resultsr r r r Zkidsr � r �O/opt/alt/python37/lib/python3.7/site-packages/libpasteurize/fixes/fix_raise_.py� transform s " zFixRaise.transformN)�__name__� __module__�__qualname__ZPATTERNr r r r r r s r N)�__doc__Zlib2to3r Zlib2to3.fixer_utilr r r r r ZBaseFixr r r r r �<module> s