U
    —Ð~dˆ  ã                   @   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ÚtypeZnext_siblingZprev_sibling)ÚnodeÚslash© r	   ú]/var/www/html/myproject/myenv/lib/python3.8/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__Z	run_orderr   r   r	   r	   r	   r
   r      s   r   N)	Ú__doc__Zlib2to3r   Zlibfuturize.fixer_utilr   r   r   ZBaseFixr   r	   r	   r	   r
   Ú<module>   s   	