PyCharm
 
Get PyCharm

Copy and move refactorings

Last modified: 04 December 2024

The Move refactoring lets you move classes, functions, modules, files, and directories within a project. In doing so, PyCharm tracks these movements and automatically corrects all references to the moved symbols in the source code.

The following Move refactorings are available:

  • The Move File refactoring moves a file to another directory.

  • The Move Directory refactoring moves a directory to another directory.

  • The Move Module Members refactoring moves top-level symbols of a Python module.

  • The Make local function/method top-level refactoring converts a method or a local function to a top-level function and moves it to the specified file.