eric6/Debugger/WatchPointViewer.py

changeset 7251
bc5b1b00560a
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/Debugger/WatchPointViewer.py	Sat Sep 21 13:03:17 2019 +0200
+++ b/eric6/Debugger/WatchPointViewer.py	Sat Sep 21 13:37:58 2019 +0200
@@ -8,10 +8,12 @@
 """
 
 
-from PyQt5.QtCore import Qt, QModelIndex, QItemSelectionModel, \
-    QSortFilterProxyModel
-from PyQt5.QtWidgets import QTreeView, QAbstractItemView, QMenu, QHeaderView, \
-    QDialog
+from PyQt5.QtCore import (
+    Qt, QModelIndex, QItemSelectionModel, QSortFilterProxyModel
+)
+from PyQt5.QtWidgets import (
+    QTreeView, QAbstractItemView, QMenu, QHeaderView, QDialog
+)
 
 from E5Gui.E5Application import e5App
 from E5Gui import E5MessageBox
@@ -156,15 +158,15 @@
         self.backMenuActions = {}
         self.backMenu = QMenu()
         self.backMenu.addAction(self.tr("Add"), self.__addWatchPoint)
-        self.backMenuActions["EnableAll"] = \
-            self.backMenu.addAction(self.tr("Enable all"),
-                                    self.__enableAllWatchPoints)
-        self.backMenuActions["DisableAll"] = \
-            self.backMenu.addAction(self.tr("Disable all"),
-                                    self.__disableAllWatchPoints)
-        self.backMenuActions["DeleteAll"] = \
-            self.backMenu.addAction(self.tr("Delete all"),
-                                    self.__deleteAllWatchPoints)
+        self.backMenuActions["EnableAll"] = self.backMenu.addAction(
+            self.tr("Enable all"),
+            self.__enableAllWatchPoints)
+        self.backMenuActions["DisableAll"] = self.backMenu.addAction(
+            self.tr("Disable all"),
+            self.__disableAllWatchPoints)
+        self.backMenuActions["DeleteAll"] = self.backMenu.addAction(
+            self.tr("Delete all"),
+            self.__deleteAllWatchPoints)
         self.backMenu.addSeparator()
         self.backMenu.addAction(self.tr("Configure..."), self.__configure)
         self.backMenu.aboutToShow.connect(self.__showBackMenu)
@@ -232,18 +234,19 @@
         if index is None:
             index = QModelIndex()
         idx = self.__model.getWatchPointIndex(cond, special)
-        duplicate = idx.isValid() and \
-            idx.internalPointer() != index.internalPointer()
+        duplicate = (idx.isValid() and
+                     idx.internalPointer() != index.internalPointer())
         if showMessage and duplicate:
             if not special:
-                msg = self.tr("""<p>A watch expression '<b>{0}</b>'"""
-                              """ already exists.</p>""")\
-                    .format(Utilities.html_encode(cond))
+                msg = self.tr(
+                    """<p>A watch expression '<b>{0}</b>'"""
+                    """ already exists.</p>"""
+                ).format(Utilities.html_encode(cond))
             else:
                 msg = self.tr(
                     """<p>A watch expression '<b>{0}</b>'"""
-                    """ for the variable <b>{1}</b> already exists.</p>""")\
-                    .format(special, Utilities.html_encode(cond))
+                    """ for the variable <b>{1}</b> already exists.</p>"""
+                ).format(special, Utilities.html_encode(cond))
             E5MessageBox.warning(
                 self,
                 self.tr("Watch expression already exists"),
@@ -438,5 +441,5 @@
         """
         Private method to open the configuration dialog.
         """
-        e5App().getObject("UserInterface")\
-            .showPreferences("debuggerGeneralPage")
+        e5App().getObject("UserInterface").showPreferences(
+            "debuggerGeneralPage")

eric ide

mercurial