ยปCore Development>Code coverage>Lib/lib2to3/fixes/fix_getcwdu.py

Python code coverage for Lib/lib2to3/fixes/fix_getcwdu.py

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