changeset 490:ca35d9e6d63e

eypdoc comments: fixed some warnings/errors imported from: moin--main--1.5--patch-494
author Thomas Waldmann <tw@waldmann-edv.de>
date Wed, 22 Mar 2006 09:03:08 +0000
parents 9082a95430db
children be33ecd58d4e
files ChangeLog MoinMoin/Page.py MoinMoin/PageEditor.py MoinMoin/_tests/__init__.py MoinMoin/action/LikePages.py MoinMoin/auth.py MoinMoin/formatter/dom_xml.py MoinMoin/formatter/text_html.py MoinMoin/packages.py MoinMoin/request.py MoinMoin/search.py MoinMoin/server/daemon.py MoinMoin/theme/__init__.py MoinMoin/util/ParserBase.py MoinMoin/util/pysupport.py MoinMoin/wikiacl.py MoinMoin/wikiutil.py
diffstat 17 files changed, 89 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 21 19:56:04 2006 +0000
+++ b/ChangeLog	Wed Mar 22 09:03:08 2006 +0000
@@ -2,6 +2,27 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-03-22 10:03:08 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-494
+
+    Summary:
+      eypdoc comments: fixed some warnings/errors
+    Revision:
+      moin--main--1.5--patch-494
+
+    eypdoc comments: fixed some warnings/errors
+    
+
+    modified files:
+     ChangeLog MoinMoin/Page.py MoinMoin/PageEditor.py
+     MoinMoin/_tests/__init__.py MoinMoin/action/LikePages.py
+     MoinMoin/auth.py MoinMoin/formatter/dom_xml.py
+     MoinMoin/formatter/text_html.py MoinMoin/packages.py
+     MoinMoin/request.py MoinMoin/search.py
+     MoinMoin/server/daemon.py MoinMoin/theme/__init__.py
+     MoinMoin/util/ParserBase.py MoinMoin/util/pysupport.py
+     MoinMoin/wikiacl.py MoinMoin/wikiutil.py
+
+
 2006-03-21 20:56:04 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-493
 
     Summary:
--- a/MoinMoin/Page.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/Page.py	Wed Mar 22 09:03:08 2006 +0000
@@ -605,7 +605,7 @@
         If you want to get a more accurate number, call with
         exists=1. This will be about 100 times slower though.
 
-        @param exits: filter existing pages
+        @param exists: filter existing pages
         @rtype: int
         @return: number of pages
         """
@@ -623,7 +623,7 @@
         return count
 
     def getPageList(self, user=None, exists=1, filter=None):
-        ''' List user readable pages under current page
+        """ List user readable pages under current page
 
         Currently only request.rootpage is used to list pages, but if we
         have true sub pages, any page can list its sub pages.
@@ -647,10 +647,10 @@
 
         @param user: the user requesting the pages (MoinMoin.user.User)
         @param filter: filter function
-        @param exits: filter existing pages
+        @param exists: filter existing pages
         @rtype: list of unicode strings
         @return: user readable wiki page names
-        '''
+        """
         request = self.request
         request.clock.start('getPageList')
         # Check input
@@ -702,7 +702,7 @@
 
         @param user: the user requesting the pages
         @param filter: filter function
-        @param exits: only existing pages
+        @param exists: only existing pages
         @rtype: dict {unicode: Page}
         @return: user readable pages
         """
@@ -760,17 +760,17 @@
         return pages
 
     def getlines(self):
-        """Return a list of all lines in body.
+        """ Return a list of all lines in body.
 
-        @rtype list
+        @rtype: list
         @return: list of strs body_lines"""
         lines = self.get_raw_body().split('\n')
         return lines
 
     def get_raw_body(self):
-        """Load the raw markup from the page file.
+        """ Load the raw markup from the page file.
 
-        @rtype str
+        @rtype: str
         @return: raw page contents of this page
         """
         if self._raw_body is None:
@@ -816,7 +816,7 @@
         @param request: the request object
         @param querystr: the query string to add after a "?" after the url
             (str or dict, see wikiutil.makeQueryString)
-        @param escpae: escape url for html, to be backward compatible
+        @param escape: escape url for html, to be backward compatible
             with old code (bool)
         @rtype: str
         @return: complete url of this page, including scriptname
--- a/MoinMoin/PageEditor.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/PageEditor.py	Wed Mar 22 09:03:08 2006 +0000
@@ -646,7 +646,7 @@
         Replace text of the user UserName/MoinEditorBackup with newtext.
 
         @param newtext: new text of the page
-        @keyword: none used currently
+        @param kw: no keyword args used currently
         @rtype: unicode
         @return: url of page backup or None
         """
--- a/MoinMoin/_tests/__init__.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/_tests/__init__.py	Wed Mar 22 09:03:08 2006 +0000
@@ -62,7 +62,7 @@
     and when the TestConfig is deleted, they are restored automatically.
     
     Typical Usage
-    ------------
+    -------------
     ::
         from MoinMoin._tests import TestConfig
         class SomeTestCase(unittest.TestCase):
@@ -80,7 +80,7 @@
 
         @param request: current request
         @param defaults: list of keys that should use the default value
-        @param **custom: other keys using non default values, or new keys
+        @param custom: other keys using non default values, or new keys
                that request.cfg does not have already
         """
         self.request = request
--- a/MoinMoin/action/LikePages.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/action/LikePages.py	Wed Mar 22 09:03:08 2006 +0000
@@ -113,7 +113,8 @@
 
 
 def wikiMatches(pagename, pages, start_re=None, end_re=None):
-    """ Get pages that starts or ends with same word as this page
+    """
+    Get pages that starts or ends with same word as this page
 
     Matches are ranked like this:
         4 - page is subpage of pagename
--- a/MoinMoin/auth.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/auth.py	Wed Mar 22 09:03:08 2006 +0000
@@ -455,10 +455,10 @@
     """
 
     def __init__(self, apps=['egw'], s_path="/tmp", s_prefix="sess_"):
-        """ @param apps A list of the enabled applications. See above for
+        """ @param apps: A list of the enabled applications. See above for
             possible keys.
-            @param s_path The path where the PHP sessions are stored.
-            @param s_prefix The prefix of the session files.
+            @param s_path: The path where the PHP sessions are stored.
+            @param s_prefix: The prefix of the session files.
         """
         
         self.s_path = s_path
--- a/MoinMoin/formatter/dom_xml.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/formatter/dom_xml.py	Wed Mar 22 09:03:08 2006 +0000
@@ -79,7 +79,7 @@
         """ low level function: opens tag right now
 
         @param tag: tag name, string
-        @param attr: attributes keywords, ascii or unicode
+        @param attrs: attributes keywords, ascii or unicode
         """
         self.tag_stack.append((tag, attrs))
         node = self.document.createElement(tag)
--- a/MoinMoin/formatter/text_html.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/formatter/text_html.py	Wed Mar 22 09:03:08 2006 +0000
@@ -51,7 +51,8 @@
 
 
 def rewrite_attribute_name(name, default_namespace='html'):
-    """Takes an attribute name and tries to make it HTML correct.
+    """
+    Takes an attribute name and tries to make it HTML correct.
 
     This function takes an attribute name as a string, as it may be
     passed in to a formatting method using a keyword-argument syntax,
@@ -211,7 +212,7 @@
             defined, will return attributes only if the current lang is
             different from the content lang.
         @rtype: dict
-        @retrun: language attributes
+        @return: language attributes
         """
         if not lang:
             lang = self.request.current_lang
@@ -230,7 +231,7 @@
 
         @param attr: dict containing keys and values
         @param allowed_attrs: A list of allowable attribute names
-        @param **kw: other arbitrary attributes expressed as keyword arguments.
+        @param kw: other arbitrary attributes expressed as keyword arguments.
         @rtype: string
         @return: formated attributes or empty string
 
@@ -522,23 +523,24 @@
             return self.url(1, href, title=title, do_escape=1, css=html_class) # interwiki links with umlauts
 
     def url(self, on, url=None, css=None, do_escape=0, **kw):
-        """ Inserts an <a> element.
-
-            Call once with on=1 to start the link, and again with on=0
-            to end it (no other arguments are needed when on==0).
-
-            do_escape: XXX doesn't work yet
+        """
+        Inserts an <a> element.
 
-            Keyword params:
-                url - the URL to link to; will go through Wiki URL mapping.
-                css - a space-separated list of CSS classes
-                attrs -  just include this string verbatim inside
-                         the <a> element; can be used for arbitrary attrs;
-                         all escaping and quoting is the caller's responsibility.
+        Call once with on=1 to start the link, and again with on=0
+        to end it (no other arguments are needed when on==0).
 
-            Note that the 'attrs' keyword argument is for backwards compatibility
-            only.  It should not be used for new code--instead just pass
-            any attributes in as separate keyword arguments.
+        do_escape: XXX doesn't work yet
+
+        Keyword params:
+            url - the URL to link to; will go through Wiki URL mapping.
+            css - a space-separated list of CSS classes
+            attrs -  just include this string verbatim inside
+                     the <a> element; can be used for arbitrary attrs;
+                     all escaping and quoting is the caller's responsibility.
+
+        Note that the 'attrs' keyword argument is for backwards compatibility
+        only.  It should not be used for new code--instead just pass
+        any attributes in as separate keyword arguments.
         """
         if not on:
             return self._close('a')
@@ -1247,7 +1249,7 @@
 
         @param attrs: attribute dict
         @param prefix: used in wiki table attributes
-        @rtyp: dict
+        @rtype: dict
         @return: valid table attributes
         """
         if not attrs:
--- a/MoinMoin/packages.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/packages.py	Wed Mar 22 09:03:08 2006 +0000
@@ -105,12 +105,13 @@
         self.ignoreExceptions = self._toBoolean(boolean)
 
     def do_ensureversion(self, version, lines=0):
-        """ Ensures that the version of MoinMoin is greater or equal than
-            version. If lines is unspecified, the script aborts. Otherwise,
-            the next lines (amount specified by lines) are not executed.
+        """
+        Ensures that the version of MoinMoin is greater or equal than
+        version. If lines is unspecified, the script aborts. Otherwise,
+        the next lines (amount specified by lines) are not executed.
 
         @param version: required version of MoinMoin (e.g. "1.3.4")
-        @param lines:   lines to ignore
+        @param lines: lines to ignore
         """
         from MoinMoin.version import release
         version_int = [int(x) for x in version.split(".")]
@@ -230,8 +231,9 @@
         page.deletePage(comment)
 
     def do_replaceunderlay(self, filename, pagename):
-        """ Overwrites underlay pages. Implementational detail: This needs to be
-            kept in sync with the page class.
+        """
+        Overwrites underlay pages. Implementational detail: This needs to be
+        kept in sync with the page class.
 
         @param filename: name of the file in the package
         @param pagename: page to be overwritten
@@ -361,8 +363,8 @@
     def __init__(self, request, filename):
         """ Initialise the package.
 
-        @param request RequestBase instance
-        @param filename filename of the .zip file
+        @param request: RequestBase instance
+        @param filename: filename of the .zip file
         """
 
         Package.__init__(self, request)
--- a/MoinMoin/request.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/request.py	Wed Mar 22 09:03:08 2006 +0000
@@ -563,10 +563,11 @@
 
         @param theme_name: the name of the theme
         @type theme_name: str
-        @returns: 0 on success, 1 if user theme could not be loaded,
-                  2 if a hard fallback to modern theme was required.
         @rtype: int
         @return: success code
+                 0 on success
+                 1 if user theme could not be loaded,
+                 2 if a hard fallback to modern theme was required.
         """
         fallback = 0
         if theme_name == "<default>":
@@ -925,9 +926,9 @@
         Create the args from a standard cgi.FieldStorage or from given
         form. Each key contain a list of values.
 
-        @keyword form: a cgi.FieldStorage
+        @param form: a cgi.FieldStorage
         @rtype: dict
-        @return dict with form keys, each contains a list of values
+        @return: dict with form keys, each contains a list of values
         """
         if form is None:
             form = cgi.FieldStorage()
@@ -1979,7 +1980,7 @@
         """ Sends out headers and possibly sets default content-type
             and status.
 
-            @keyword more_headers: list of strings, defaults to []
+            @param more_headers: list of strings, defaults to []
         """
         for header in more_headers + getattr(self, 'user_headers', []):
             self.setHttpHeader(header)
--- a/MoinMoin/search.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/search.py	Wed Mar 22 09:03:08 2006 +0000
@@ -1084,7 +1084,7 @@
         text. Matches behind location are ignored and an empty string is
         returned.
 
-        @param text: text containing match
+        @param body: text containing match
         @param match: search match in text
         @param location: current location in text
         @rtype: unicode
--- a/MoinMoin/server/daemon.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/server/daemon.py	Wed Mar 22 09:03:08 2006 +0000
@@ -64,7 +64,7 @@
     def __init__(self, name, function, *args, **kw):
         """ Create a daemon
         
-        @param pidFile: the pid file for this server.
+        @param name: name of the process (determines pid filename, too)
         @param function: the server main function, will block until the
             server is done.
         @param args: arguments to pass to function
--- a/MoinMoin/theme/__init__.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/theme/__init__.py	Wed Mar 22 09:03:08 2006 +0000
@@ -134,7 +134,6 @@
         admin inserted in the config file. Everything it enclosed inside
         a div with id="logo".
         
-        @param d: parameter dictionary
         @rtype: unicode
         @return: logo html
         """
@@ -319,7 +318,7 @@
         If you don't like to do this in your theme, or want to use
         different algorithm, override this method.
         
-        @param text: page name, unicode
+        @param name: page name, unicode
         @rtype: unicode
         @return: shortened version.
         """
--- a/MoinMoin/util/ParserBase.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/util/ParserBase.py	Wed Mar 22 09:03:08 2006 +0000
@@ -39,7 +39,7 @@
     calling parser to extract further arguments.
 
     @param request: a request instance
-    @param arg: the argument string
+    @param args: the argument string
 
     @returns: numbers, start, step, attrdict
     """
--- a/MoinMoin/util/pysupport.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/util/pysupport.py	Wed Mar 22 09:03:08 2006 +0000
@@ -80,7 +80,7 @@
     @param function: function to make thread safe
     @param lock: threading.Lock instance or None
     @rtype: function
-    @retrun: function decorated with locking
+    @return: function decorated with locking
     """
     if lock is None:
         import threading
--- a/MoinMoin/wikiacl.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/wikiacl.py	Wed Mar 22 09:03:08 2006 +0000
@@ -251,7 +251,7 @@
         """ Initialize acl iterator
 
         @param rights: the acl rights to consider when parsing
-        @param aclstirng: string to parse
+        @param aclstring: string to parse
         """
         self.rights = rights
         self.rest = aclstring.strip()
--- a/MoinMoin/wikiutil.py	Tue Mar 21 19:56:04 2006 +0000
+++ b/MoinMoin/wikiutil.py	Wed Mar 22 09:03:08 2006 +0000
@@ -82,7 +82,7 @@
     Decodes input from the user.
     
     @param s: the string to unquote
-    @param charset: the charset to assume the string is in
+    @param charsets: list of charsets to assume the string is in
     @rtype: unicode
     @return: the unquoted string as unicode
     """
@@ -202,9 +202,9 @@
     Use urllib.quote to quote any character that is not always safe. 
 
     @param pagename: the original pagename (unicode)
-    @charset: url text encoding, 'utf-8' recommended. Other charsert
-              might not be able to encode the page name and raise
-              UnicodeError. (default config.charset ('utf-8')).
+    @param charset: url text encoding, 'utf-8' recommended. Other charsert
+                    might not be able to encode the page name and raise
+                    UnicodeError. (default config.charset ('utf-8')).
     @rtype: string
     @return: the quoted filename, all unsafe characters encoded
     """
@@ -331,7 +331,7 @@
     Todo: search clients of unquoteWikiname and check for exceptions. 
 
     @param filename: string using charset and possibly quoted parts
-    @param charset: charset used by string
+    @param charsets: list of charsets used by string
     @rtype: Unicode String
     @return: WikiName
     """
@@ -995,7 +995,7 @@
     @param text: text / inner part of the <a>...</a> link - does NOT get
                  escaped, so you can give HTML here and it will be used verbatim
     @param formatter: the formatter object to use
-    @keyword on: opening/closing tag only
+    @param on: opening/closing tag only
     @keyword attrs: additional attrs (HTMLified string)
     @rtype: string
     @return: formatted link tag