Please add implement method to refactoring menu
Brought to you by:
fabioz
This would be similar to extract method except that it woud infer the type and add the method to that class.
For example:
If I had an unimplemented method as follows:
instanceOfClassA.unimplementedMethod(param1, param2)
When I used the refactoringing I would get this:
class ClassA(object):
def unimplementedMethod(param1, param2)
pass
Additionally it would be nice if it notice that a value was being returned and put in a return statement
Actually, that's already available in 2 ways:
You can either: select a given class, right click > refactoring > override/implement methods (in the menu, the shortcut for it will appear).
Another option would be in the derived class method, request a code-completion right after the 'def'.
I.e.:
class A:
..def method(self):
....pass
class B(A):
..def <- request code completion here and it should show the list of methods to override.