PyCharm 2016.2 Help

Extract Superclass

Basics

The Extract Superclass refactoring enables extracting certain methods of a class into a superclass.

Example

BeforeAfter
py_extract_superclass1
py_extract_superclass2

To extract a superclass

  1. On the on the main menu or on the context menu, choose Refactor | Extract | Superclass.
  2. In the Extract Superclass dialog box that appears, specify the following information:
    • Name of the new superclass.
    • Target directory where it will be stored.
    • Methods to be included in the superclass.
  3. Proceed with the refactoring.

See Also

Last modified: 23 November 2016