PyCharm
 
Get PyCharm

Pull members up, push members down

Last modified: 08 October 2024

The Pull Members Up refactoring allows you to move class members to a superclass.

Pull Members Up refactoring can create abstract methods. If a project makes use of the interpreter Python 2.x, then only the instance methods can be abstracted. If a project uses Python 3.x, then any method can be abstracted.

Note that PyCharm automatically adds import statements, required for abstract methods.

The Push Members Down refactoring helps clean up the class hierarchy by moving class members to a subclass. The members are then relocated into the direct subclasses only.