void (@NotNull CodeStyleSettings settings) { final PyCodeStyleSettings pySettings = settings.getCustomSettings(PyCodeStyleSettings.class); mySortImports.setSelected(pySettings.OPTIMIZE_IMPORTS_SORT_IMPORTS); mySortNamesInFromImports.setSelected(pySettings.OPTIMIZE_IMPORTS_SORT_NAMES_IN_FROM_IMPORTS); mySortNamesInFromImports.setEnabled(mySortImports.isSelected()); mySortImportsByTypeFirst.setSelected(pySettings.OPTIMIZE_IMPORTS_SORT_BY_TYPE_FIRST); mySortImportsByTypeFirst.setEnabled(mySortImports.isSelected()); mySortCaseInsensitively.setSelected(pySettings.OPTIMIZE_IMPORTS_CASE_INSENSITIVE_ORDER); if (pySettings.OPTIMIZE_IMPORTS_JOIN_FROM_IMPORTS_WITH_SAME_SOURCE) { myJoinFromImportsWithSameSource.setSelected(true); } else if (pySettings.OPTIMIZE_IMPORTS_ALWAYS_SPLIT_FROM_IMPORTS) { myAlwaysSplitFromImports.setSelected(true); } else { myDoNothingWithFromImports.setSelected(true); } }