관리-도구
편집 파일: fix_apply.cpython-310.pyc
o 6��f* � @ 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 s2 | j }|sJ �|d }|d }|�d�}|r'|j| j jkr'|jd jdv r'd S |r:|j| j jkr:|jd jdkr:d S |j}|�� }|jtj |j fvr]|j|jksY|jd jtjkr]t |�}d|_|�� }d|_|d urr|�� }d|_t�tjd �|g}|d ur�|�t� t�tjd�|g� d |d _t|||d�S )N�func�args�kwds� > �*�**r ���� r � )�prefix)�syms�get�typeZargument�children�valuer Zcloner �NAMEZatomZpower� DOUBLESTARr r ZLeaf�STAR�extendr r ) �selfZnodeZresultsr r r r r Z l_newargs� r �>/opt/alt/python310/lib64/python3.10/lib2to3/fixes/fix_apply.py� transform s@ � 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