o
    [ªRhˆ  ã                   @   s>   d Z ddlmZ ddlmZmZ dd„ ZG dd„ dejƒZdS )	z?
Fixer for division: from __future__ import division if needed
é    )Ú
fixer_base)ÚtokenÚfuture_importc                 C   s,   t j}| j|ko| jj|k o| jj|k S )zw
    __future__.division redefines the meaning of a single slash for division,
    so we match that and only that.
    )r   ÚSLASHÚtypeÚnext_siblingÚprev_sibling)ÚnodeÚslash© r   úb/home/air/sanwanet/backup_V2/venv/lib/python3.10/site-packages/libpasteurize/fixes/fix_division.pyÚmatch_division   s   ÿr   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚFixDivisioné   c                 C   s   t |ƒS )z¦
        Since the tree needs to be fixed once and only once if and only if it
        matches, then we can start discarding matches after we make the first.
        )r   )Úselfr	   r   r   r   Úmatch   s   zFixDivision.matchc                 C   s   t d|ƒ d S )NÚdivision)r   )r   r	   Úresultsr   r   r   Ú	transform   s   zFixDivision.transformN)Ú__name__Ú
__module__Ú__qualname__Ú	run_orderr   r   r   r   r   r   r      s    r   N)	Ú__doc__Úlib2to3r   Úlibfuturize.fixer_utilr   r   r   ÚBaseFixr   r   r   r   r   Ú<module>   s
    	