Hacked By AnonymousFox
3
\~ � @ sR d Z ddlmZ ddlmZ ddlmZ ddlmZmZm Z G dd� dej
�ZdS ) zIFixer for apply().
This converts apply(func, v, k) into (func)(*v, **k).� )�pytree)�token)�
fixer_base)�Call�Comma�parenthesizec @ s e Zd ZdZdZdd� ZdS )�FixApplyTa.
power< 'apply'
trailer<
'('
arglist<
(not argument<NAME '=' any>) func=any ','
(not argument<NAME '=' any>) args=any [','
(not argument<NAME '=' any>) kwds=any] [',']
>
')'
>
>
c C sF | j }|st�|d }|d }|jd�}|r`|j| j jkr>d S |j| j jkr`|jd jdkr`d S |r�|j| j jkr�|jd jdkr�d S |j}|j � }|jt
j|jfkr�|j|j
ks�|jd jt
jkr�t|�}d|_|j � }d|_|d k r�|j � }d|_tjt
jd�|g}|d k �r8|jt� tjt
jd�|g� d |d _t|||d
�S )
N�func�args�kwds� z**r � �*� )�prefix���r )�syms�AssertionError�get�typeZ star_exprZargumentZchildren�valuer Zcloner �NAMEZatomZpower�
DOUBLESTARr r ZLeaf�STAR�extendr r ) �selfZnodeZresultsr r r
r r Z l_newargs� r �//usr/lib64/python3.6/lib2to3/fixes/fix_apply.py� transform sB
zFixApply.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr r r r r r s r N)�__doc__r
r Zpgen2r r Z
fixer_utilr r r ZBaseFixr r r r r �<module> s
Hacked By AnonymousFox1.0, Coded By AnonymousFox