eric6/UI/PythonAstViewer.py

changeset 7264
bedbe458d792
parent 7229
53054eb5b15a
child 7360
9190402e4505
diff -r c1af2e327675 -r bedbe458d792 eric6/UI/PythonAstViewer.py
--- a/eric6/UI/PythonAstViewer.py	Tue Sep 24 18:46:24 2019 +0200
+++ b/eric6/UI/PythonAstViewer.py	Tue Sep 24 19:08:10 2019 +0200
@@ -13,8 +13,10 @@
 
 from PyQt5.QtCore import pyqtSlot, Qt, QTimer
 from PyQt5.QtGui import QCursor, QBrush
-from PyQt5.QtWidgets import QTreeWidget, QApplication, QTreeWidgetItem, \
-    QAbstractItemView, QWidget, QVBoxLayout
+from PyQt5.QtWidgets import (
+    QTreeWidget, QApplication, QTreeWidgetItem, QAbstractItemView, QWidget,
+    QVBoxLayout
+)
 
 from ThirdParty.asttokens.asttokens import ASTTokens
 
@@ -255,16 +257,20 @@
         itm = QTreeWidgetItem(parent, [text])
         itm.setExpanded(True)
         
-        if hasattr(nodeOrFields, "lineno") and \
-           hasattr(nodeOrFields, "col_offset"):
+        if (
+            hasattr(nodeOrFields, "lineno") and
+            hasattr(nodeOrFields, "col_offset")
+        ):
             itm.setData(0, self.StartLineRole, nodeOrFields.lineno)
             itm.setData(0, self.StartIndexRole, nodeOrFields.col_offset)
             startStr = self.tr("{0},{1}").format(
                 nodeOrFields.lineno, nodeOrFields.col_offset)
             endStr = ""
             
-            if hasattr(nodeOrFields, "end_lineno") and \
-               hasattr(nodeOrFields, "end_col_offset"):
+            if (
+                hasattr(nodeOrFields, "end_lineno") and
+                hasattr(nodeOrFields, "end_col_offset")
+            ):
                 itm.setData(0, self.EndLineRole, nodeOrFields.end_lineno)
                 itm.setData(0, self.EndIndexRole,
                             nodeOrFields.end_col_offset)

eric ide

mercurial