Corrected some code style issues. eric7

Wed, 16 Jun 2021 19:21:45 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 16 Jun 2021 19:21:45 +0200
branch
eric7
changeset 8430
14c69f0ccca5
parent 8428
2deec2f8a9ab
child 8431
bed315a45088

Corrected some code style issues.

eric7/UI/UserInterface.py file | annotate | diff | comparison | revisions
eric7/WebBrowser/TabManager/TabManagerWidget.py file | annotate | diff | comparison | revisions
scripts/install.py file | annotate | diff | comparison | revisions
--- a/eric7/UI/UserInterface.py	Wed Jun 16 17:47:50 2021 +0200
+++ b/eric7/UI/UserInterface.py	Wed Jun 16 19:21:45 2021 +0200
@@ -761,7 +761,6 @@
         # connect to the desktop environment session manager
         app.commitDataRequest.connect(self.__commitData,
                                       Qt.ConnectionType.DirectConnection)
-        app.saveStateRequest.connect(self.__saveState)
         
     def networkAccessManager(self):
         """
@@ -7555,14 +7554,3 @@
                 # We did not get permission to interact, play it safe and
                 # save all data.
                 self.viewmanager.saveAllEditors()
-    
-    def __saveState(self, manager: QSessionManager):
-        """
-        Private slot to save the state when instructed by the desktop session
-        manager.
-        
-        @param manager reference to the desktop session manager
-        @type QSessionManager
-        """
-        # TODO: implement saving the state
-        print("__saveState() call by session manager")
--- a/eric7/WebBrowser/TabManager/TabManagerWidget.py	Wed Jun 16 17:47:50 2021 +0200
+++ b/eric7/WebBrowser/TabManager/TabManagerWidget.py	Wed Jun 16 19:21:45 2021 +0200
@@ -244,13 +244,11 @@
         else:
             parentItem = None
         itm = QTreeWidgetItem(parentItem)
-        if parent:
-            addFlags = Qt.ItemFlag.ItemIsUserCheckable
-        else:
-            addFlags = (
-                Qt.ItemFlag.ItemIsUserCheckable |
-                Qt.ItemFlag.ItemIsAutoTristate
-            )
+        addFlags = (
+            Qt.ItemFlag.ItemIsUserCheckable
+            if parent else
+            (Qt.ItemFlag.ItemIsUserCheckable | Qt.ItemFlag.ItemIsAutoTristate)
+        )
         itm.setFlags(itm.flags() | addFlags)
         itm.setCheckState(0, Qt.CheckState.Unchecked)
         
--- a/scripts/install.py	Wed Jun 16 17:47:50 2021 +0200
+++ b/scripts/install.py	Wed Jun 16 19:21:45 2021 +0200
@@ -1558,7 +1558,7 @@
     }
     # dict with tuples of package name and install constraint
     # TODO: enable this once qt6_applications is released
-    if False:
+    if False:       # __IGNORE_WARNING_Y102__
         if sys.platform != "darwin" and not ignorePyqt6Tools:
             optionalModulesList["qt6-applications"] = ("qt6_applications", "")
     

eric ide

mercurial