o
    ,º]i  ã                   @   s2   d Z ddlmZ ddlmZ G dd„ dejƒZdS )zm
Fixer for os.getcwd() -> os.getcwdu().
Also warns about "from os import getcwd", suggesting the above form.
é    )Ú
fixer_base)ÚNamec                   @   s   e Zd ZdZdd„ ZdS )Ú	FixGetcwdz 
              power< 'os' trailer< dot='.' name='getcwd' > any* >
              |
              import_from< 'from' 'os' 'import' bad='getcwd' >
              c                 C   sH   d|v r|d }|  td|jd�¡ d S d|v r |  |d¡ d S tdƒ‚)NÚnameÚgetcwdu)ÚprefixÚbadz#import os, use os.getcwd() instead.z,For some reason, the pattern matcher failed.)Úreplacer   r   Úcannot_convertÚ
ValueError)ÚselfÚnodeÚresultsr   © r   ú[/var/www/html/myproject/venv/lib/python3.10/site-packages/libpasteurize/fixes/fix_getcwd.pyÚ	transform   s   zFixGetcwd.transformN)Ú__name__Ú
__module__Ú__qualname__ÚPATTERNr   r   r   r   r   r   	   s    r   N)Ú__doc__Úlib2to3r   Úlib2to3.fixer_utilr   ÚBaseFixr   r   r   r   r   Ú<module>   s    