Python code coverage for Lib/lib2to3/fixes/fix_getcwdu.py
# | count | content |
---|---|---|
1 | n/a | """ |
2 | n/a | Fixer that changes os.getcwdu() to os.getcwd(). |
3 | n/a | """ |
4 | n/a | # Author: Victor Stinner |
5 | n/a | |
6 | n/a | # Local imports |
7 | n/a | from .. import fixer_base |
8 | n/a | from ..fixer_util import Name |
9 | n/a | |
10 | n/a | class FixGetcwdu(fixer_base.BaseFix): |
11 | n/a | BM_compatible = True |
12 | n/a | |
13 | n/a | PATTERN = """ |
14 | n/a | power< 'os' trailer< dot='.' name='getcwdu' > any* > |
15 | n/a | """ |
16 | n/a | |
17 | n/a | def transform(self, node, results): |
18 | n/a | name = results["name"] |
19 | n/a | name.replace(Name("getcwd", prefix=name.prefix)) |