7P6
d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z ddl
mZmZm
Z
ej d Z G d d
ej ZdS )a
For the ``future`` package.
Adds this import line:
from past.builtins import str as oldstr
at the top and wraps any unadorned string literals 'abc' or explicit byte-string
literals b'abc' in oldstr() calls so the code has the same behaviour on Py3 as
on Py2.6/2.7.
)unicode_literalsN)
fixer_base)token)syms)
future_importtouch_import_topwrap_in_fn_callz[^uUrR]?[\'\"]c e Zd ZdZdZd ZdS )
FixOldstrWrapTSTRINGc |j t j k rtt dd| t |j rF| }d|_ d|j z |_ t d|g|j }|S d S d S )Nz
past.typesoldstr b)prefix)
typer r r _literal_rematchvaluecloner r )selfnoderesultsnewwrappeds s/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/libfuturize/fixes/fix_oldstr_wrap.py transformzFixOldstrWrap.transform s 9$$]It<<< ,,
jjll !
39, )(SE$+NNN %$
N)__name__
__module____qualname__
BM_compatiblePATTERNr r r r r s- MG
r r )__doc__
__future__r relib2to3r
lib2to3.pgen2r lib2to3.fixer_utilr libfuturize.fixer_utilr r r compiler BaseFixr r$ r r