eric6/Utilities/ClassBrowsers/pyclbr.py

changeset 7259
7c017076c12e
parent 7249
0bf517e60f54
child 7360
9190402e4505
--- a/eric6/Utilities/ClassBrowsers/pyclbr.py	Mon Sep 23 19:10:42 2019 +0200
+++ b/eric6/Utilities/ClassBrowsers/pyclbr.py	Mon Sep 23 19:22:12 2019 +0200
@@ -362,22 +362,22 @@
     f = None
     if inpackage:
         try:
-            f, file, (suff, mode, type) = \
-                ClassBrowsers.find_module(module, path)
+            f, file, (suff, mode, type) = ClassBrowsers.find_module(
+                module, path)
         except ImportError:
             f = None
     if f is None:
         fullpath = path[:] + sys.path[:]
-        f, file, (suff, mode, type) = \
-            ClassBrowsers.find_module(module, fullpath, isPyFile)
+        f, file, (suff, mode, type) = ClassBrowsers.find_module(
+            module, fullpath, isPyFile)
     if module.endswith(".py") and type == imp.PKG_DIRECTORY:
         return dictionary
     if type == imp.PKG_DIRECTORY:
         dictionary['__path__'] = [file]
         _modules[module] = dictionary
         path = [file] + path
-        f, file, (suff, mode, type) = \
-            ClassBrowsers.find_module('__init__', [file])
+        f, file, (suff, mode, type) = ClassBrowsers.find_module(
+            '__init__', [file])
     if f:
         f.close()
     if type not in SUPPORTED_TYPES:
@@ -444,15 +444,16 @@
                         deltaindentcalculated = 1
                     thisindent -= deltaindent
                 else:
-                    while conditionalsstack and \
-                            conditionalsstack[-1] >= thisindent:
+                    while (
+                        conditionalsstack and
+                        conditionalsstack[-1] >= thisindent
+                    ):
                         del conditionalsstack[-1]
                         if deltastack:
                             del deltastack[-1]
                     deltaindentcalculated = 0
             # close all classes indented at least as much
-            while classstack and \
-                    classstack[-1][1] >= thisindent:
+            while classstack and classstack[-1][1] >= thisindent:
                 if classstack[-1][0] is not None:
                     # record the end line
                     classstack[-1][0].setEndLine(lineno - 1)
@@ -498,8 +499,7 @@
             # we found a class definition
             thisindent = _indent(m.group("ClassIndent"))
             # close all classes indented at least as much
-            while classstack and \
-                    classstack[-1][1] >= thisindent:
+            while classstack and classstack[-1][1] >= thisindent:
                 if classstack[-1][0] is not None:
                     # record the end line
                     classstack[-1][0].setEndLine(lineno - 1)
@@ -558,8 +558,10 @@
             last_lineno_pos = start
             index = -1
             while index >= -len(classstack):
-                if classstack[index][0] is not None and \
-                   not isinstance(classstack[index][0], Function):
+                if (
+                    classstack[index][0] is not None and
+                    not isinstance(classstack[index][0], Function)
+                ):
                     attr = Attribute(
                         module, m.group("AttributeName"), file, lineno)
                     classstack[index][0]._addattribute(attr)
@@ -641,8 +643,7 @@
         elif m.start("ConditionalDefine") >= 0:
             # a conditional function/method definition
             thisindent = _indent(m.group("ConditionalDefineIndent"))
-            while conditionalsstack and \
-                    conditionalsstack[-1] >= thisindent:
+            while conditionalsstack and conditionalsstack[-1] >= thisindent:
                 del conditionalsstack[-1]
                 if deltastack:
                     del deltastack[-1]

eric ide

mercurial