Extended the module documentor by a @ireturn tag to document the intended return value (e.g. in a base class defining an interface).

Sun, 29 Sep 2013 10:19:28 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 29 Sep 2013 10:19:28 +0200
changeset 2956
615dbd8a696a
parent 2955
e9aeafe80329
child 2957
c7f8c7561542

Extended the module documentor by a @ireturn tag to document the intended return value (e.g. in a base class defining an interface).

DocumentationTools/ModuleDocumentor.py file | annotate | diff | comparison | revisions
--- a/DocumentationTools/ModuleDocumentor.py	Sat Sep 28 20:12:12 2013 +0200
+++ b/DocumentationTools/ModuleDocumentor.py	Sun Sep 29 10:19:28 2013 +0200
@@ -878,7 +878,7 @@
             ditem = self.__processInlineTags(ditem)
             desc = ditem.strip()
             if desc:
-                if desc.startswith("@param") or desc.startswith("@keyparam"):
+                if desc.startswith(("@param", "@keyparam")):
                     inTagSection = True
                     parts = desc.split(None, 2)
                     if len(parts) < 2:
@@ -891,16 +891,14 @@
                     except IndexError:
                         paramList.append([paramName, []])
                     lastItem = paramList[-1][1]
-                elif desc.startswith("@return"):
+                elif desc.startswith(("@return", "@ireturn")):
                     inTagSection = True
                     parts = desc.split(None, 1)
                     if len(parts) < 2:
                         raise TagError("Wrong format in {0} line.\n".format(parts[0]))
                     returns = [parts[1]]
                     lastItem = returns
-                elif desc.startswith("@exception") or \
-                     desc.startswith("@throws") or \
-                     desc.startswith("@raise"):
+                elif desc.startswith(("@exception", "@throws", "@raise")):
                     inTagSection = True
                     parts = desc.split(None, 2)
                     if len(parts) < 2:

eric ide

mercurial