SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py

changeset 41
e747eb5f3f43
parent 39
401d0bab970d
child 43
135907873e65
diff -r e534c4399087 -r e747eb5f3f43 SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py
--- 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)

eric ide

mercurial