Python code coverage for Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py
# | count | content |
---|---|---|
1 | n/a | from lib2to3.fixer_base import BaseFix |
2 | n/a | from lib2to3.fixer_util import Name |
3 | n/a | |
4 | n/a | class FixParrot(BaseFix): |
5 | n/a | """ |
6 | n/a | Change functions named 'parrot' to 'cheese'. |
7 | n/a | """ |
8 | n/a | |
9 | n/a | PATTERN = """funcdef < 'def' name='parrot' any* >""" |
10 | n/a | |
11 | n/a | def transform(self, node, results): |
12 | n/a | name = results["name"] |
13 | n/a | name.replace(Name("cheese", name.prefix)) |