
c'oTi  ã               @   sC   d  Z  d d l m Z d d l m Z Gd 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   se   d | k r5 | d } | j  t d d | j ƒƒ n, d | k rU |  j | d ƒ d  St d ƒ ‚ d  S)NÚnameZgetcwduÚprefixZbadz#import os, use os.getcwd() instead.z,For some reason, the pattern matcher failed.)Úreplacer   r   Zcannot_convertÚ
ValueError)ÚselfZnodeZresultsr   © r
   ú@/usr/lib/python3/dist-packages/libpasteurize/fixes/fix_getcwd.pyÚ	transform   s    
zFixGetcwd.transformN)Ú__name__Ú
__module__Ú__qualname__ZPATTERNr   r
   r
   r
   r   r   	   s   r   N)Ú__doc__Zlib2to3r   Zlib2to3.fixer_utilr   ZBaseFixr   r
   r
   r
   r   Ú<module>   s   