📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 01:39:10
📂
/ (Root)
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
libfuturize
/
fixes
/
__pycache__
📍 /opt/alt/python37/lib/python3.7/site-packages/libfuturize/fixes/__pycache__
🔄 Refresh
✏️
Editing: fix_oldstr_wrap.cpython-37.pyc
Read Only
B �A�[� � @ sp d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z ddl mZmZm Z e�d�ZG d 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 @ s e Zd ZdZdZdd� ZdS )� FixOldstrWrapT�STRINGc C sX |j tjkrTtdd|� t�|j�rT|�� }d|_d|j |_t d|g|jd�}|S d S )Nz past.typesZoldstr� �b)�prefix) �typer r r �_literal_re�match�value�cloner r )�self�node�results�new�wrapped� r �R/opt/alt/python37/lib/python3.7/site-packages/libfuturize/fixes/fix_oldstr_wrap.py� transform s zFixOldstrWrap.transformN)�__name__� __module__�__qualname__Z BM_compatibleZPATTERNr r r r r r s r )�__doc__� __future__r �reZlib2to3r Z lib2to3.pgen2r Zlib2to3.fixer_utilr Zlibfuturize.fixer_utilr r r �compiler ZBaseFixr r r r r �<module> s
💾 Save Changes
❌ Cancel