--- a/SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py Wed Apr 08 19:22:28 2020 +0200 +++ b/SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py Wed Jun 24 17:36:34 2020 +0200 @@ -7,8 +7,6 @@ Module implementing Selection Encloser configuration page. """ -from __future__ import unicode_literals - import os from PyQt5.QtCore import pyqtSlot, Qt @@ -16,8 +14,9 @@ from E5Gui.E5Application import e5App -from Preferences.ConfigurationPages.ConfigurationPageBase import \ +from Preferences.ConfigurationPages.ConfigurationPageBase import ( ConfigurationPageBase +) from .Ui_SelectionEncloserPage import Ui_SelectionEncloserPage import UI.PixmapCache @@ -45,7 +44,7 @@ lightness = palette.color(QPalette.Window).lightness() usesDarkPalette = lightness <= 128 if usesDarkPalette: - iconSuffix = "dark" + iconSuffix = "dark" else: iconSuffix = "light" @@ -219,8 +218,9 @@ if ok and menuTitle: itm.setText(0, menuTitle) else: - from .SelectionEncloserEditDialog import \ + from .SelectionEncloserEditDialog import ( SelectionEncloserEditDialog + ) dlg = SelectionEncloserEditDialog( itm.text(0), itm.data(0, Qt.UserRole), self) if dlg.exec_() == QDialog.Accepted: @@ -250,15 +250,16 @@ # top level item if self.menuTree.indexOfTopLevelItem(itm) == 0: upEnable = False - if self.menuTree.indexOfTopLevelItem(itm) == \ - self.menuTree.topLevelItemCount() - 1: + if ( + self.menuTree.indexOfTopLevelItem(itm) == + self.menuTree.topLevelItemCount() - 1 + ): downEnable = False else: # sub item if parent.indexOfChild(itm) == 0: upEnable = False - if parent.indexOfChild(itm) == \ - parent.childCount() - 1: + if parent.indexOfChild(itm) == parent.childCount() - 1: downEnable = False addEnable = False self.addButton.setEnabled(addEnable)