Ctrl+Alt+OCtrl+Alt+OCtrl+Alt+OCtrl+Alt+OCtrl+Alt+OCtrl+Alt+OCtrl+Shift+ICtrl+Alt+O or Ctrl+Shift+OControl Alt OAlt Command OShift Command O
In this dialog box, specify where you want PyCharm to remove unused import statements from, in order to optimize the import procedure.
|File||Click this option to have unused imports removed from the current file. This option is selected by default, if a file in the editor has the focus, or if it is selected in the Project tool window.|
|All files in directory <directory name>||Click this option to have unused imports removed from all files in the current directory at once. This option is selected by default, if a directory is selected in the Project tool window.|
|Include subdirectories||Select this check box to have unused imports removed from all files in all subfolders of the current directory.
The check box is shown if the directory in question has subdirectories. The check box is enabled only when the All files in directory option is selected.
|Rearrange entries||Select this check box to reorder your code entries.|
|Only VCS changed text||If this check box is selected, then reformatting will apply only to the files that have been changed locally,
but not yet checked in to the repository.
This check box is only available for the files under version control.
|Do not show this dialog in the future||Select this check box to perform import optimization in the future silently.|