PyCharm 5.0 Help

Specify Code Cleanup Scope Dialog

Code | Code Cleanup


Use this dialog to automatically apply an inspection profile to the selected scope, without having to implement each separate fix individually.

The choice of scopes varies depending on the current selection in the Project tool window and the position of focus when this dialog is invoked.

ItemDescription
Whole projectSelect this option if you want to perform code cleanup for the whole project.
Uncommitted filesThis option is only available for projects under version control.

Select this option if you only want to perform code cleanup for the files that have not yet been committed to a version control system, and choose a changelist from the drop-down list.

Current FileSelect this option if you want to perform code cleanup for the current file only. This option is available when the Code Cleanup functionality is invoked from the editor.
File <file path>Select this option to perform code cleanup for the file that is currently selected in the Project tool window or opened in the editor.
Module <module name>Select this option to perform code cleanup for the project that is currently selected in the Project tool window.

This option is only available, when several projects are opened in one PyCharm window .

Directory <directory path>Select this option to perform code cleanup for the directory currently selected in the Project tool window.
This option is only available when a directory is selected in the Project tool window.
Custom scopeSelect this option to specify a custom scope. Select one of the predefined scopes from the drop-down list, or click the browseButton button and define the scope in the Scopes dialog that opens. For instructions on how to define a scope, refer to Scope Language Syntax Reference.
Inspection profile Select inspection profile you want to apply. Choose a pre-defined profile from the drop-down list, or click the browseButton button and configure a profile in the Inspections dialog that opens.

You can also invoke the Inspections dialog to check which fixes will be applied to the selected scope when you run code cleanup.

See Also

Last modified: 10 December 2015