1"""
2Fixer that changes os.getcwdu() to os.getcwd().
3"""
4# Author: Victor Stinner
5
6# Local imports
7from .. import fixer_base
8from ..fixer_util import Name
9
10class FixGetcwdu(fixer_base.BaseFix):
11    BM_compatible = True
12
13    PATTERN = """
14              power< 'os' trailer< dot='.' name='getcwdu' > any* >
15              """
16
17    def transform(self, node, results):
18        name = results["name"]
19        name.replace(Name(u"getcwd", prefix=name.prefix))
20