"""Fix bound method attributes (method.im_? -> method.__?__).
# Author: Christian Heimes
from .. import fixer_base
from ..fixer_util import Name
"im_class" : "__self__.__class__"
class FixMethodattrs(fixer_base.BaseFix):
power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
def transform(self, node, results):
attr = results["attr"][0]
attr.replace(Name(new, prefix=attr.prefix))