| Current Path : /lib/python3/dist-packages/libpasteurize/fixes/__pycache__/ |
| Current File : //lib/python3/dist-packages/libpasteurize/fixes/__pycache__/fix_getcwd.cpython-38.pyc |
U
,�]i � @ s2 d Z ddlmZ ddlmZ G dd� dej�ZdS )zm
Fixer for os.getcwd() -> os.getcwdu().
Also warns about "from os import getcwd", suggesting the above form.
� )�
fixer_base)�Namec @ s e Zd ZdZdd� ZdS )� FixGetcwdz�
power< 'os' trailer< dot='.' name='getcwd' > any* >
|
import_from< 'from' 'os' 'import' bad='getcwd' >
c C sJ d|kr&|d }|� td|jd�� n d|kr>| �|d� d S td��d S )N�nameZgetcwdu)�prefixZbadz#import os, use os.getcwd() instead.z,For some reason, the pattern matcher failed.)�replacer r Zcannot_convert�
ValueError)�selfZnodeZresultsr � r
�@/usr/lib/python3/dist-packages/libpasteurize/fixes/fix_getcwd.py� transform s zFixGetcwd.transformN)�__name__�
__module__�__qualname__ZPATTERNr r
r
r
r r s r N)�__doc__Zlib2to3r Zlib2to3.fixer_utilr ZBaseFixr r
r
r
r �<module> s