#574 Please auto pull-up method

open
nobody
5
2012-03-29
2012-03-29
Luke
No

Can you add the functionality described on pg. 322 of Martin Fowler's Refactoring book?

I have classes B and C which have a duplicated method:

class ClassB(object):
def duplicatedMethod(self)
print ("Hi")

class ClassC(object):
def duplicatedMethod(self)
print ("Hi")

I would like a refactoring option to create a new base class (or add to it) such that the selected method is automatically populated on the base class.

So after running the refactoring I would have:

class ClassA(object):
def duplicatedMethod(self)
print ("Hi")

class ClassB(ClassA):

class ClassC(ClassA):

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks