o
    áË·e  ã                   @   s<   d Z ddlmZ ddlmZ dddœZG dd„ dejƒZd	S )
at  Fixer that changes unicode to str and unichr to chr, but -- unlike the
lib2to3 fix_unicode.py fixer, does not change u"..." into "...".

The reason is that Py3.3+ supports the u"..." string prefix, and, if
present, the prefix may provide useful information for disambiguating
between byte strings and unicode strings, which is often the hardest part
of the porting task.

é    )Útoken)Ú
fixer_baseÚchrÚstr)ÚunichrÚunicodec                   @   s   e Zd ZdZdZdd„ ZdS )ÚFixUnicodeKeepUTz'unicode' | 'unichr'c                 C   s(   |j tjkr| ¡ }t|j |_|S d S )N)Útyper   ÚNAMEÚcloneÚ_mappingÚvalue)ÚselfÚnodeÚresultsÚnew© r   ú[/var/www/ideatree/venv/lib/python3.10/site-packages/libfuturize/fixes/fix_unicode_keep_u.pyÚ	transform   s
   ýzFixUnicodeKeepU.transformN)Ú__name__Ú
__module__Ú__qualname__ÚBM_compatibleÚPATTERNr   r   r   r   r   r      s    r   N)Ú__doc__Úlib2to3.pgen2r   Úlib2to3r   r   ÚBaseFixr   r   r   r   r   Ú<module>   s
    

