File: //lib/python3/dist-packages/libfuturize/fixes/__pycache__/fix_division_safe.cpython-310.pyc
o
,�]� � @ s| d Z ddlZddlmZmZmZ ddlmZ ddlm Z m
Z
mZmZ dd� Z
e�d�Zd d
� Zdd� ZG d
d� dej�ZdS )aL
For the ``future`` package.
Adds this import line:
from __future__ import division
at the top and changes any old-style divisions to be calls to
past.utils.old_div so the code runs as before on Py2.6/2.7 and has the same
behaviour on Py3.
If "from __future__ import division" is already in effect, this fixer does
nothing.
� N)�Leaf�Node�Comma)�
fixer_base)�token�
future_import�touch_import_top�wrap_in_fn_callc C s, t j}| j|ko| jj|k o| jj|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 �E/usr/lib/python3/dist-packages/libfuturize/fixes/fix_division_safe.py�match_division s �r z^[0-9]*[.][0-9]*$c C s t | j�p t | j�S )N)�
_is_floatyr
r )r r r r � is_floaty"