HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/libfuturize/fixes/__pycache__/fix_oldstr_wrap.cpython-310.pyc
o

,�]��@spdZddlmZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
e�d�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�STRINGcCs\|jtjkr*tdd|�t�|j�r,|��}d|_d|j|_t	d|g|jd�}|SdSdS)Nz
past.types�oldstr��b)�prefix)
�typerr
r�_literal_re�match�value�clonerr)�self�node�results�new�wrapped�r�C/usr/lib/python3/dist-packages/libfuturize/fixes/fix_oldstr_wrap.py�	transforms�zFixOldstrWrap.transformN)�__name__�
__module__�__qualname__�
BM_compatible�PATTERNrrrrrr	sr	)�__doc__�
__future__r�re�lib2to3r�
lib2to3.pgen2r�lib2to3.fixer_utilr�libfuturize.fixer_utilrrr�compiler�BaseFixr	rrrr�<module>s