HEX
Server: LiteSpeed
System: Linux baran.dnsprotection.me 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: ddir12 (3618)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/libfuturize/fixes/__pycache__/fix_oldstr_wrap.cpython-36.pyc
3

�c��@spdZddlmZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
ejd�ZGd	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_import�touch_import_top�wrap_in_fn_callz[^uUrR]?[\'\"]c@seZdZdZdZdd�ZdS)�
FixOldstrWrapT�STRINGcCsX|jtjkrTtdd|�tj|j�rT|j�}d|_d|j|_t	d|g|jd�}|SdS)Nz
past.typesZoldstr��b)�prefix)
�typerr
r�_literal_re�match�valueZcloner
r)�selfZnode�results�new�wrapped�r�%/usr/lib/python3.6/fix_oldstr_wrap.py�	transformszFixOldstrWrap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr	sr	)�__doc__Z
__future__r�reZlib2to3rZ
lib2to3.pgen2rZlib2to3.fixer_utilrZlibfuturize.fixer_utilrrr�compilerZBaseFixr	rrrr�<module>s