관리-도구
편집 파일: fix_raise.cpython-37.opt-1.pyc
B �A�[K � @ sB d Z ddlmZ ddlmZmZmZmZmZ G dd� dej �Z dS )z;Fixer for 'raise E(V).with_traceback(T)' -> 'raise E, V, T'� )� 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� |� d�|� d�|� d� }}}|� d�}|d k rR| �|d� |j�� |�� |d k r�|rf|d n ttjd�}d |_|_ttjd �|�� t � |�� t � |�� g}t tj|�}|� |� d S ) N�name�val�trc�chainz8explicit exception chaining is not supported in Python 2r �None� �raise)�getZwarningZprev_sibling�remover r �NAME�prefixZcloner r r � raise_stmt�replace) �selfZnodeZresultsr r r r Zkidsr � r �N/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