a
    “iÓ  ć                   @   s:   d Z ddlmZ ddlmZmZmZ G dd dejZdS )zFixer for exec.

This converts usages of the exec statement into calls to a built-in
exec() function.

exec code in ns1, ns2 -> exec(code, ns1, ns2)
é   )Ś
fixer_base)ŚCommaŚNameŚCallc                   @   s   e Zd ZdZdZdd ZdS )ŚFixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    c                 C   s   |sJ | j }|d }| d”}| d”}| ” g}d|d _|d urZ| t | ” g” |d urv| t | ” g” ttd||jdS )NŚaŚbŚcŚ é    Śexec)Śprefix)ŚsymsŚgetZcloner   Śextendr   r   r   )ŚselfZnodeŚresultsr   r   r   r	   Śargs© r   ś./usr/lib64/python3.9/lib2to3/fixes/fix_exec.pyŚ	transform   s    



zFixExec.transformN)Ś__name__Ś
__module__Ś__qualname__ZBM_compatibleZPATTERNr   r   r   r   r   r      s   r   N)	Ś__doc__r
   r   Z
fixer_utilr   r   r   ZBaseFixr   r   r   r   r   Ś<module>   s   	