관리-도구
편집 파일: fix_oldstr_wrap.cpython-311.pyc
� �܋f� � � � 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_import�touch_import_top�wrap_in_fn_callz[^uUrR]?[\'\"]c � � e Zd ZdZdZd� ZdS )� FixOldstrWrapT�STRINGc � � |j t j k rtt dd|� � t � |j � � rF|� � � }d|_ d|j z |_ t d|g|j �� � }|S d S d S )Nz past.types�oldstr� �b)�prefix) �typer r r �_literal_re�match�value�cloner r )�self�node�results�new�wrappeds �r/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/libfuturize/fixes/fix_oldstr_wrap.py� transformzFixOldstrWrap.transform s� � ��9���$�$��]�I�t�<�<�<�� � ���,�,� ��j�j�l�l�� !�� � �3�9�,�� �)�(�S�E�$�+�N�N�N���� %�$� � � N)�__name__� __module__�__qualname__� BM_compatible�PATTERNr � r r r r s- � � � � � ��M��G� � � � � r r )�__doc__� __future__r �re�lib2to3r � lib2to3.pgen2r �lib2to3.fixer_utilr �libfuturize.fixer_utilr r r �compiler �BaseFixr r$ r r �<module>r. s� �� � � (� '� '� '� '� '� � � � � � � � � � � � � � � � � #� #� #� #� #� #�5� 5� 5� 5� 5� 5� 5� 5� 5� 5� �b�j�*�+�+��� � � � �J�&� � � � � r