8BVo d Z ddlZddlmZmZmZ ddlmZ ddlm Z m Z mZmZ d Z ej d Zd Zd Z G 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)LeafNodeComma) fixer_base)token future_importtouch_import_topwrap_in_fn_callc t 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 SLASHtypenext_siblingprev_sibling)nodeslashs u/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/libfuturize/fixes/fix_division_safe.pymatch_divisionr sH KE9 Fd&7&<&E"E F&*&7&<&E"EF z^[0-9]*[.][0-9]*$c R t | j pt | j S )N) _is_floatyr r )r s r is_floatyr " s# d'((IJt7H,I,IIr c > t | t r| d } t | t rt | j S t | t r6t | j d t r| j d j dk S dS )Nr floatF) isinstancelistr const_rematchvaluer children)exprs r r r &