mailr16299 - /branches/uf_redesign/prompt/uf_docstring.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 13, 2012 - 18:14:
Author: bugman
Date: Sun May 13 18:14:31 2012
New Revision: 16299

URL: http://svn.gna.org/viewcvs/relax?rev=16299&view=rev
Log:
Eliminated the build_doc() function as this is no longer used.

The new auto-generated user functions use a variant of this function as the 
_build_doc() method.


Modified:
    branches/uf_redesign/prompt/uf_docstring.py

Modified: branches/uf_redesign/prompt/uf_docstring.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/uf_docstring.py?rev=16299&r1=16298&r2=16299&view=diff
==============================================================================
--- branches/uf_redesign/prompt/uf_docstring.py (original)
+++ branches/uf_redesign/prompt/uf_docstring.py Sun May 13 18:14:31 2012
@@ -54,60 +54,6 @@
 
     # Return the text.
     return new_text
-
-
-def build_doc(fn):
-    """Build the fn.__doc__ docstring.
-
-    @param fn:  The user function to build the docstring for.
-    @type fn:   method
-    """
-
-    # Initialise.
-    fn.__doc__ = ""
-
-    # Add the title.
-    fn.__doc__ = "%s%s\n" % (fn.__doc__, fn._doc_title)
-
-    # Add the keyword args.
-    if hasattr(fn, '_doc_args'):
-        fn.__doc__ = fn.__doc__ + build_subtitle("Keyword Arguments")
-        for arg, desc in fn._doc_args:
-            # The text.
-            text = "%s:  %s" % (arg, desc)
-
-            # Format.
-            text = format_text(text)
-
-            # Add to the docstring.
-            fn.__doc__ = "%s%s\n" % (fn.__doc__, text)
-
-    # Add the description.
-    if hasattr(fn, '_doc_desc'):
-        fn.__doc__ = fn.__doc__ + build_subtitle("Description")
-        fn.__doc__ = fn.__doc__ + format_text(fn._doc_desc)
-
-    # Add the examples.
-    if hasattr(fn, '_doc_examples'):
-        fn.__doc__ = fn.__doc__ + '\n' + build_subtitle("Examples")
-        fn.__doc__ = fn.__doc__ + format_text(fn._doc_examples)
-
-    # Add the additional sections.
-    if hasattr(fn, '_doc_additional'):
-        # Loop over each section.
-        for i in range(len(fn._doc_additional)):
-            fn.__doc__ = fn.__doc__ + '\n' + 
build_subtitle(fn._doc_additional[i][0])
-            fn.__doc__ = fn.__doc__ + format_text(fn._doc_additional[i][1])
-
-    # Convert the _doc_args list into a dictionary for easy argument 
description retrieval.
-    if hasattr(fn, '_doc_args'):
-        # Init.
-        fn._doc_args_dict = {}
-
-        # Loop over the args.
-        for arg, desc in fn._doc_args:
-            fn._doc_args_dict[arg] = desc
-
 
 
 def build_subtitle(text, bold=True):




Related Messages


Powered by MHonArc, Updated Sun May 13 18:20:02 2012