/opt/imh-python/lib/python3.9/lib2to3/tests/data/fixers/myfixes
NameSizeModeActions
fix_explicit.py1230644editdlrm
fix_first.py1240644editdlrm
fix_last.py1250644editdlrm
fix_parrot.py3470644editdlrm
fix_preorder.py1270644editdlrm
__init__.py00644editdlrm
Edit: /opt/imh-python/lib/python3.9/lib2to3/tests/data/fixers/myfixes/fix_parrot.py (347B)
from lib2to3.fixer_base import BaseFix from lib2to3.fixer_util import Name class FixParrot(BaseFix): """ Change functions named 'parrot' to 'cheese'. """ PATTERN = """funcdef < 'def' name='parrot' any* >""" def transform(self, node, results): name = results["name"] name.replace(Name("cheese", name.prefix))