Utilities/ClassBrowsers/rbclbr.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3039
8dd0165d805d
child 3145
a9de05d4a22f
--- a/Utilities/ClassBrowsers/rbclbr.py	Fri Nov 01 15:48:48 2013 +0100
+++ b/Utilities/ClassBrowsers/rbclbr.py	Sun Nov 03 15:58:22 2013 +0100
@@ -158,7 +158,7 @@
             end \b [^_]
         )
     )
-""", re.VERBOSE | re.DOTALL | re.MULTILINE).search
+""", re.VERBOSE | re.DOTALL | re.MULTILINE).search      # __IGNORE_WARNING__
 
 _commentsub = re.compile(r"""#[^\n]*\n|#[^\n]*$""").sub
 
@@ -304,8 +304,8 @@
             thisindent = indent
             indent += 1
             meth_name = m.group("MethodName") or \
-                        m.group("MethodName2") or \
-                        m.group("MethodName3")
+                m.group("MethodName2") or \
+                m.group("MethodName3")
             meth_sig = m.group("MethodSignature")
             meth_sig = meth_sig and meth_sig.replace('\\\n', '') or ''
             meth_sig = _commentsub('', meth_sig)
@@ -317,13 +317,13 @@
                 meth_name = meth_name[6:]
             # close all classes/modules indented at least as much
             while classstack and \
-                  classstack[-1][1] >= thisindent:
+                    classstack[-1][1] >= thisindent:
                 if classstack[-1][0] is not None:
                     # record the end line
                     classstack[-1][0].setEndLine(lineno - 1)
                 del classstack[-1]
             while acstack and \
-                  acstack[-1][1] >= thisindent:
+                    acstack[-1][1] >= thisindent:
                 del acstack[-1]
             if classstack:
                 # it's a class/module method
@@ -383,7 +383,7 @@
             last_lineno_pos = start
             # close all classes/modules indented at least as much
             while classstack and \
-                  classstack[-1][1] >= thisindent:
+                    classstack[-1][1] >= thisindent:
                 if classstack[-1][0] is not None:
                     # record the end line
                     classstack[-1][0].setEndLine(lineno - 1)
@@ -417,7 +417,7 @@
             cur_obj = cur_class
             classstack.append((cur_class, thisindent))
             while acstack and \
-                  acstack[-1][1] >= thisindent:
+                    acstack[-1][1] >= thisindent:
                 del acstack[-1]
             acstack.append(["public", thisindent])  # default access control
                                                     # is 'public'
@@ -430,7 +430,7 @@
             last_lineno_pos = start
             # close all classes/modules indented at least as much
             while classstack and \
-                  classstack[-1][1] >= thisindent:
+                    classstack[-1][1] >= thisindent:
                 if classstack[-1][0] is not None:
                     # record the end line
                     classstack[-1][0].setEndLine(lineno - 1)
@@ -458,7 +458,7 @@
             cur_obj = cur_class
             classstack.append((cur_class, thisindent))
             while acstack and \
-                  acstack[-1][1] >= thisindent:
+                    acstack[-1][1] >= thisindent:
                 del acstack[-1]
             acstack.append(["public", thisindent])  # default access control
                                                     # is 'public'
@@ -470,7 +470,7 @@
                 while index >= -len(acstack):
                     if acstack[index][1] < indent:
                         actype = m.group("AccessControlType") or \
-                                 m.group("AccessControlType2").split('_')[0]
+                            m.group("AccessControlType2").split('_')[0]
                         acstack[index][0] = actype.lower()
                         break
                     else:
@@ -483,7 +483,7 @@
                        not classstack[index][1] >= indent:
                         parent = classstack[index][0]
                         actype = m.group("AccessControlType") or \
-                                 m.group("AccessControlType2").split('_')[0]
+                            m.group("AccessControlType2").split('_')[0]
                         actype = actype.lower()
                         for name in aclist.split(","):
                             name = name.strip()[1:]   # get rid of leading ':'
@@ -533,8 +533,8 @@
                             break
                         name = nv[0].strip()[1:]    # get rid of leading ':'
                         attr = parent._getattribute("@" + name) or \
-                               parent._getattribute("@@" + name) or \
-                               Attribute(module, "@" + name, file, lineno)
+                            parent._getattribute("@@" + name) or \
+                            Attribute(module, "@" + name, file, lineno)
                         if len(nv) == 1 or nv[1].strip() == "false":
                             attr.setProtected()
                         elif nv[1].strip() == "true":
@@ -545,8 +545,8 @@
                         for name in m.group("AttrList").split(","):
                             name = name.strip()[1:]   # get rid of leading ':'
                             attr = parent._getattribute("@" + name) or \
-                                   parent._getattribute("@@" + name) or \
-                                   Attribute(module, "@" + name, file, lineno)
+                                parent._getattribute("@@" + name) or \
+                                Attribute(module, "@" + name, file, lineno)
                             if access == "_accessor":
                                 attr.setPublic()
                             elif access == "_reader" or access == "_writer":

eric ide

mercurial