Thomas Waldmann avatar Thomas Waldmann committed 1d8e9b1

docstrings: convert epydoc fields to rst/sphinx fields

Comments (0)

Files changed (60)

     """
     Factory for moin wsgi apps
 
-    @param flask_config_file: a flask config file name (may have a MOINCFG class),
+    :param flask_config_file: a flask config file name (may have a MOINCFG class),
                               if not given, a config pointed to by MOINCFG env var
                               will be loaded (if possible).
-    @param flask_config_dict: a dict used to update flask config (applied after
+    :param flask_config_dict: a dict used to update flask config (applied after
                               flask_config_file was loaded [if given])
-    @param moin_config_class: if you give this, it'll be instantiated as app.cfg,
+    :param moin_config_class: if you give this, it'll be instantiated as app.cfg,
                               otherwise it'll use MOINCFG from flask config. If that
                               also is not there, it'll use the DefaultConfig built
                               into MoinMoin.
-    @param warn_default: emit a warning if moin falls back to its builtin default
+    :param warn_default: emit a warning if moin falls back to its builtin default
                          config (maybe user forgot to specify MOINCFG?)
-    @param **kwargs: if you give additional key/values here, they'll get patched
+    :param **kwargs: if you give additional key/values here, they'll get patched
                      into the moin configuration class (before it instance is created)
     """
     clock = Clock()

MoinMoin/apps/frontend/views.py

     """
     Returns the list of all items that link or transclude item_name
 
-    @param item_name: the name of the current item
-    @type item_name: unicode
-    @return: a page with all the items which link or transclude item_name
+    :param item_name: the name of the current item
+    :type item_name: unicode
+    :returns: a page with all the items which link or transclude item_name
     """
     refs_here = _backrefs(flaskg.storage.iteritems(), item_name)
     return render_template('item_link_list.html',
     """
     Returns a list with all names of items which ref item_name
 
-    @param items: all the items
-    @type items: iteratable sequence
-    @param item_name: the name of the item transcluded or linked
-    @type item_name: unicode
-    @return: the list of all items which ref item_name
+    :param items: all the items
+    :type items: iteratable sequence
+    :param item_name: the name of the item transcluded or linked
+    :type item_name: unicode
+    :returns: the list of all items which ref item_name
     """
     refs_here = []
     for item in items:
     Returns a dict with all the names of non-existing items which are refed by
     other items and the items which are refed by
 
-    @param items: all the items
-    @type items: iteratable sequence
-    @return: a dict with all the wanted items and the items which are beign refed by
+    :param items: all the items
+    :type items: iteratable sequence
+    :returns: a dict with all the wanted items and the items which are beign refed by
     """
     all_items = set()
     wanteds = {}
     """
     Returns a list with the names of all existing items not being refed by any other item
 
-    @param items: the list of all items
-    @type items: iteratable sequence
-    @return: the list of all orphaned items
+    :param items: the list of all items
+    :type items: iteratable sequence
+    :returns: the list of all orphaned items
     """
     linked_items = set()
     transcluded_items = set()
 def findMatches(item_name, s_re=None, e_re=None):
     """ Find similar item names.
 
-    @param item_name: name to match
-    @param s_re: start re for wiki matching
-    @param e_re: end re for wiki matching
-    @rtype: tuple
-    @return: start word, end word, matches dict
+    :param item_name: name to match
+    :param s_re: start re for wiki matching
+    :param e_re: end re for wiki matching
+    :rtype: tuple
+    :returns: start word, end word, matches dict
     """
     item_names = [item.name for item in flaskg.storage.iteritems()]
     if item_name in item_names:
         2 - match end
         1 - match start
 
-    @param item_name: item name to match
-    @param item_names: list of item names
-    @param start_re: start word re (compile regex)
-    @param end_re: end word re (compile regex)
-    @rtype: tuple
-    @return: start, end, matches dict
+    :param item_name: item name to match
+    :param item_names: list of item names
+    :param start_re: start word re (compile regex)
+    :param end_re: end word re (compile regex)
+    :rtype: tuple
+    :returns: start, end, matches dict
     """
     if start_re is None:
         start_re = re.compile('([%s][%s]+)' % (config.chars_upper,
 
     Return all matching item names with rank above cutoff value.
 
-    @param item_name: item name to match
-    @param item_names: list of item names
-    @rtype: list
-    @return: list of matching item names, sorted by rank
+    :param item_name: item name to match
+    :param item_names: list of item names
+    :rtype: list
+    :returns: list of matching item names, sorted by rank
     """
     # Match using case insensitive matching
     # Make mapping from lower item names to item names.

MoinMoin/auth/__init__.py

        authentication at the auth method requesting it (parameter auth_name.)
        Additional fields are added to the URL from the extra_fields dict.
 
-       @param auth_name: name of the auth method requesting the continuation
-       @param extra_fields: extra GET fields to add to the URL
+       :param auth_name: name of the auth method requesting the continuation
+       :param extra_fields: extra GET fields to add to the URL
     """
     # logically, this belongs to request, but semantically it should
     # live in auth so people do auth.get_multistage_continuation_url()

MoinMoin/config/default.py

 
         If you don't want to check passwords, use password_checker = None.
 
-        @return: None if there is no problem with the password,
+        :returns: None if there is no problem with the password,
                  some unicode object with an error msg, if the password is problematic.
     """
     # in any case, do a very simple built-in check to avoid the worst passwords

MoinMoin/converter/__init__.py

         """
         Register a factory
 
-        @param factory: Factory to register. Callable, must return an object
+        :param factory: Factory to register. Callable, must return an object
         """
         return self._register(self.Entry(factory, type_input, type_output, priority))
 

MoinMoin/converter/_args_wiki.py

     Parse <input> for positional and keyword arguments, with value quoting and
     quotes escaping.
 
-    @param input: can be like: a b c d=e f="g h" i='j k' l="\"m\" n" o='\'p\' q'
-    @return: Argument instance
+    :param input: can be like: a b c d=e f="g h" i='j k' l="\"m\" n" o='\'p\' q'
+    :returns: Argument instance
     """
     ret = Arguments()
 
     Argument values that need quoting will be quoted.
     Keyword names must never need quoting (would raise ValueError).
 
-    @param args: Argument instance
-    @return: argument unicode object
+    :param args: Argument instance
+    :returns: argument unicode object
     """
     ret = []
 

MoinMoin/converter/_wiki_macro.py

         """
         Should be overriden to format text in some macros according to the
         input type.
-        @return: Sequence of (ET.Element, unicode)
+        :returns: Sequence of (ET.Element, unicode)
         """
         return [text]
 

MoinMoin/converter/link.py

         """
         Converts a relative iri path into an absolute one
 
-        @param path: the relative path to be converted
-        @type path: Iri.path
-        @param current_page_path: the path of the page where the link is
-        @type current_page_path: Iri.path
-        @return: the absolute equivalent of the relative path
-        @rtype: Iri.path
+        :param path: the relative path to be converted
+        :type path: Iri.path
+        :param current_page_path: the path of the page where the link is
+        :type current_page_path: Iri.path
+        :returns: the absolute equivalent of the relative path
+        :rtype: Iri.path
         """
         quoted_path = path.quoted
         # starts from 1 because 0 is always / for the current page
     def handle_wikilocal_links(self, elem, input, page):
         """
         Adds the link item from the input param to self.links
-        @param elem: the element of the link
-        @param input: the iri of the link
-        @param page: the iri of the page where the link is
+        :param elem: the element of the link
+        :param input: the iri of the link
+        :param page: the iri of the page where the link is
         """
         path = input.path
         if not path or ':' in path:
     def handle_wikilocal_transclusions(self, elem, input, page):
         """
         Adds the transclusion item from input argument to self.transclusions
-        @param elem: the element of the transclusion
-        @param input: the iri of the transclusion
-        @param page: the iri of the page where the transclusion is
+        :param elem: the element of the transclusion
+        :param input: the iri of the transclusion
+        :param page: the iri of the page where the transclusion is
         """
         path = input.path
         if not path or ':' in path:

MoinMoin/converter/pygments_in.py

             """
             Create a Pygments Converter.
 
-            @param lexer: pygments lexer instance
-            @param mimetype: mimetype to get a lexer for
+            :param lexer: pygments lexer instance
+            :param mimetype: mimetype to get a lexer for
             """
             if lexer is None and mimetype is not None:
                 try:

MoinMoin/converter/rst_out.py

         """
         Adds cell to the row.
 
-        @param cs: number of columns spanned
+        :param cs: number of columns spanned
         """
         if cs < 1 or rs < 1:
             return
 
     def height(self):
         """
-        @return: number of rows in the table
+        :returns: number of rows in the table
         """
         return len(self.table)
 
     def width(self):
         """
-        @return: width of rows in the table or zero if rows have different width
+        :returns: width of rows in the table or zero if rows have different width
         """
         if not self.table:
             return 0
         """
         Counts the width of the column in ReSturcturedText representation.
 
-        @param col: index of the column
-        @return: number of characters
+        :param col: index of the column
+        :returns: number of characters
         """
         if self.width() <= col:
             return 0
         """
         Counts lines in ReSturcturedText representation of the row
 
-        @param row: index of the row
-        @return: number of lines
+        :param row: index of the row
+        :returns: number of lines
         """
         if self.height() <= row:
             return 0

MoinMoin/datastruct/backends/__init__.py

         """
         Initialize a group.
 
-        @param name: moin group name
-        @param backend: backend object which created this object
+        :param name: moin group name
+        :param backend: backend object which created this object
         """
         self.name = name
         self._backend = backend
         """
         Iterate over moin group names of the groups defined in this backend.
 
-        @return: moin group names
+        :returns: moin group names
         """
         raise NotImplementedError()
 
         """
         List all group names of groups containing <member>.
 
-        @param member: member name [unicode]
-        @return: list of group names [unicode]
+        :param member: member name [unicode]
+        :returns: list of group names [unicode]
         """
         for group_name in self:
             try:
         <processed_groups> is needed to avoid infinite recursion, if
         groups are defined recursively.
 
-        @param member: member name [unicode]
-        @param processed_groups: groups which were checked for containment before [set]
+        :param member: member name [unicode]
+        :param processed_groups: groups which were checked for containment before [set]
         """
 
         if processed_groups is None:
            OneGroup: Something, OtherGroup
            OtherGroup: OneGroup, SomethingOther
 
-        @param yielded_members: members which have been already yielded before [set]
-        @param processed_groups: group names which have been iterated before [set]
+        :param yielded_members: members which have been already yielded before [set]
+        :param processed_groups: group names which have been iterated before [set]
         """
 
         if processed_groups is None:
         Initialize a dict. Dicts are greedy, it stores all keys and
         items internally.
 
-        @param name: moin dict name
-        @param backend: backend object which created this object
+        :param name: moin dict name
+        :param backend: backend object which created this object
         """
         self.name = name
         self._backend = backend

MoinMoin/datastruct/backends/composite_dicts.py

 
     def __init__(self, *backends):
         """
-        @param backends: list of dict backends which are used to get
+        :param backends: list of dict backends which are used to get
                          access to the dict definitions.
         """
         super(CompositeDicts, self).__init__()

MoinMoin/datastruct/backends/composite_groups.py

 
     def __init__(self, *backends):
         """
-        @param backends: list of group backends which are used to get
+        :param backends: list of group backends which are used to get
                          access to the group definitions.
         """
         super(CompositeGroups, self).__init__()
         """
         Check if a group called group_name is available in any of the backends.
 
-        @param group_name: name of the group [unicode]
+        :param group_name: name of the group [unicode]
         """
         for backend in self._backends:
             if group_name in backend:

MoinMoin/datastruct/backends/config_groups.py

 
     def __init__(self, groups):
         """
-        @param groups: Dictionary of groups where key is group name,
+        :param groups: Dictionary of groups where key is group name,
         and value is list of members of that group.
         """
         super(ConfigGroups, self).__init__()

MoinMoin/error.py

     def __init__(self, message):
         """ Initialize an error, decode if needed
 
-        @param message: unicode, str or object that support __unicode__
+        :param message: unicode, str or object that support __unicode__
             and __str__. __str__ should use config.charset.
         """
         self.message = message

MoinMoin/items/__init__.py

         hook that can be used to add more meta data to a revision before
         it is committed.
 
-        @param newrev: new (still uncommitted) revision - modify as wanted
-        @param data: either str or open file (we can avoid having to read/seek
+        :param newrev: new (still uncommitted) revision - modify as wanted
+        :param data: either str or open file (we can avoid having to read/seek
                      rev's data with this)
         """
         remote_addr = request.remote_addr
         """
         return a file-like object with the member file data
 
-        @param name: name of the data in the container file
+        :param name: name of the data in the container file
         """
         self.rev.seek(0)
         tf = tarfile.open(fileobj=self.rev, mode='r')
         If all expected members have been put, it saves the tar container
         to a new item revision.
 
-        @param name: name of the data in the container file
-        @param content: the data to store into the tar file (str or file-like)
-        @param content_length: byte-length of content (for str, None can be given)
-        @param expected_members: set of expected member file names
+        :param name: name of the data in the container file
+        :param content: the data to store into the tar file (str or file-like)
+        :param content_length: byte-length of content (for str, None can be given)
+        :param expected_members: set of expected member file names
         """
         if not name in expected_members:
             raise StorageError("tried to add unexpected member %r to container item %r" % (name, self.name))
         """
         return a file-like object with the member file data
 
-        @param name: name of the data in the zip file
+        :param name: name of the data in the zip file
         """
         self.rev.seek(0)
         zf = zipfile.ZipFile(self.rev, mode='r')

MoinMoin/macro/Date.py

     def parse_time(self, args):
         """ parse a time specification argument for usage by Date and DateTime macro
 
-        @param args: YYYY-MM-DDTHH:MM:SS (plus optional Z for UTC, or +/-HHMM) or
+        :param args: YYYY-MM-DDTHH:MM:SS (plus optional Z for UTC, or +/-HHMM) or
                      float/int UNIX timestamp
-        @returns: UNIX timestamp (UTC)
+        :returns: UNIX timestamp (UTC)
         """
         if args is None:
             tm = time.time() # always UTC

MoinMoin/mail/sendmail.py

     e.g. '"Jürgen Hermann" <jh@web.de>'. According to the RFC, the name
     part should be encoded, the address should not.
 
-    @param address: email address, possibly using '"name" <address>' format
-    @type address: unicode
-    @param charset: specifying both the charset and the encoding, e.g
+    :param address: email address, possibly using '"name" <address>' format
+    :type address: unicode
+    :param charset: specifying both the charset and the encoding, e.g
                     quoted printable or base64.
-    @type charset: email.Charset.Charset instance
-    @rtype: string
-    @return: encoded address
+    :type charset: email.Charset.Charset instance
+    :rtype: string
+    :returns: encoded address
     """
     assert isinstance(address, unicode)
     composite = re.compile(r'(?P<phrase>.*?)(?P<blanks>\s*)\<(?P<addr>.*)\>', re.UNICODE)
 
     Return a tuple of success or error indicator and message.
 
-    @param to: recipients (list)
-    @param subject: subject of email (unicode)
-    @param text: email body text (unicode)
-    @param mail_from: override default mail_from
-    @type mail_from: unicode
-    @rtype: tuple
-    @return: (is_ok, Description of error or OK message)
+    :param to: recipients (list)
+    :param subject: subject of email (unicode)
+    :param text: email body text (unicode)
+    :param mail_from: override default mail_from
+    :type mail_from: unicode
+    :rtype: tuple
+    :returns: (is_ok, Description of error or OK message)
     """
     import smtplib, socket
     from email.Message import Message
 
 def encodeSpamSafeEmail(email_address, obfuscation_text=''):
     """ Encodes a standard email address to an obfuscated address
-    @param email_address: mail address to encode.
+    :param email_address: mail address to encode.
                           Known characters and their all-uppercase words translation:
                           "." -> " DOT "
                           "@" -> " AT "
                           "-" -> " DASH "
-    @param obfuscation_text: optional text to obfuscate the email.
+    :param obfuscation_text: optional text to obfuscate the email.
                              All characters in the string must be alphabetic
                              and they will be added in uppercase.
     """
 
     Blanks (spaces) simply get stripped.
 
-    @param address: obfuscated email address string
-    @rtype: string
-    @return: decoded email address
+    :param address: obfuscated email address string
+    :rtype: string
+    :returns: decoded email address
     """
     email = []
 

MoinMoin/search/Xapian/indexing.py

 
     def __init__(self, *args, **kwargs):
         """
-        @keyword encoding: specify the encoding manually (default: value of config.charset)
+        :keyword encoding: specify the encoding manually (default: value of config.charset)
         """
         self.encoding = kwargs.get('encoding', config.charset)
 
         """
         Perform the search using xapian
 
-        @param query: the search query objects
-        @param sort: the sorting of the results (default: 'weight')
-        @param historysearch: whether to search in all page revisions (default: 0) TODO: use/implement this
+        :param query: the search query objects
+        :param sort: the sorting of the results (default: 'weight')
+        :param historysearch: whether to search in all page revisions (default: 0) TODO: use/implement this
         """
         while True:
             try:
     def do_queued_updates(self, amount=-1):
         """ Index <amount> entries from the indexer queue.
 
-            @param amount: amount of queue entries to process (default: -1 == all)
+            :param amount: amount of queue entries to process (default: -1 == all)
         """
         try:
             request = self._indexingRequest(self.request)
     def _get_languages(self, page):
         """ Get language of a page and the language to stem it in
 
-        @param page: the page instance
+        :param page: the page instance
         """
         lang = None
         default_lang = app.cfg.language_default
     def _get_domains(self, page):
         """ Returns a generator with all the domains the page belongs to
 
-        @param page: page
+        :param page: page
         """
         if page.isStandardPage():
             yield 'standard'
 
         Index all revisions (if wanted by configuration) and all attachments.
 
-        @param request: request suitable for indexing
-        @param connection: the Indexer connection object
-        @param pagename: a page name
-        @param mode: 'add' = just add, no checks
+        :param request: request suitable for indexing
+        :param connection: the Indexer connection object
+        :param pagename: a page name
+        :param mode: 'add' = just add, no checks
                      'update' = check if already in index and update if needed (mtime)
         """
         page = Page(request, pagename)
     def _index_page_rev(self, request, connection, pagename, revno, mode='update'):
         """ Index a page revision.
 
-        @param request: request suitable for indexing
-        @param connection: the Indexer connection object
-        @param pagename: the page name
-        @param revno: page revision number (int)
-        @param mode: 'add' = just add, no checks
+        :param request: request suitable for indexing
+        :param connection: the Indexer connection object
+        :param pagename: the page name
+        :param revno: page revision number (int)
+        :param mode: 'add' = just add, no checks
                      'update' = check if already in index and update if needed (mtime)
         """
         page = Page(request, pagename, rev=revno)
     def _remove_page_rev(self, request, connection, pagename, revno):
         """ Remove a page revision from the index.
 
-        @param request: request suitable for indexing
-        @param connection: the Indexer connection object
-        @param pagename: the page name
-        @param revno: a real revision number (int), > 0
+        :param request: request suitable for indexing
+        :param connection: the Indexer connection object
+        :param pagename: the page name
+        :param revno: a real revision number (int), > 0
         """
         wikiname = app.cfg.interwikiname or u"Self"
         revision = str(revno)
     def _index_attachment(self, request, connection, pagename, attachmentname, mode='update'):
         """ Index an attachment
 
-        @param request: request suitable for indexing
-        @param connection: the Indexer connection object
-        @param pagename: the page name
-        @param attachmentname: the attachment's name
-        @param mode: 'add' = just add, no checks
+        :param request: request suitable for indexing
+        :param connection: the Indexer connection object
+        :param pagename: the page name
+        :param attachmentname: the attachment's name
+        :param mode: 'add' = just add, no checks
                      'update' = check if already in index and update if needed (mtime)
         """
         from MoinMoin.action import AttachFile
     def _index_file(self, request, connection, filename, mode='update'):
         """ index files (that are NOT attachments, just arbitrary files)
 
-        @param request: request suitable for indexing
-        @param connection: the Indexer connection object
-        @param filename: a filesystem file name
-        @param mode: 'add' = just add, no checks
+        :param request: request suitable for indexing
+        :param connection: the Indexer connection object
+        :param filename: a filesystem file name
+        :param mode: 'add' = just add, no checks
                      'update' = check if already in index and update if needed (mtime)
         """
         wikiname = app.cfg.interwikiname or u"Self"
 
         This should be called from indexPages only!
 
-        @param request: request suitable for indexing
-        @param files: an optional list of files to index
-        @param mode: 'add' = just add, no checks
+        :param request: request suitable for indexing
+        :param files: an optional list of files to index
+        :param mode: 'add' = just add, no checks
                      'update' = check if already in index and update if needed (mtime)
-        @param pages: list of pages to index, if not given, all pages are indexed
+        :param pages: list of pages to index, if not given, all pages are indexed
         """
         if pages is None:
             # Index all pages

MoinMoin/search/Xapian/search.py

     def _xapian_index(self):
         """ Get the xapian index if possible
 
-        @param request: current request
+        :param request: current request
         """
         index = XapianIndex(self.request)
 

MoinMoin/search/Xapian/tokenizer.py

 
     def __init__(self, language=None):
         """
-        @param language: if given, the language in which to stem words
+        :param language: if given, the language in which to stem words
         """
         self.stemmer = None
         if app.cfg.xapian_stemming and language:
     def raw_tokenize(self, value):
         """ Yield a stream of words from a string.
 
-        @param value: string to split, must be an unicode object or a list of
+        :param value: string to split, must be an unicode object or a list of
                       unicode objects
         """
         if isinstance(value, list): # used for page links
         """
         Yield a stream of raw lower cased and stemmed words from a string.
 
-        @param value: string to split, must be an unicode object or a list of
+        :param value: string to split, must be an unicode object or a list of
                       unicode objects
         """
         if self.stemmer:

MoinMoin/search/__init__.py

     """
     Search the text of all pages for query.
 
-    @param request: current request
-    @param query: the expression (string or query objects) we want to search for
-    @keyword sort: sorting of the search results, either 'weight' or 'page_name'
-    @keyword mtime: only items modified since mtime
-    @keyword historysearch: include older revisions of items in search
-    @keyword titlesearch: treat all terms as title searches (passed to qp)
-    @keyword case: do case sensitive search (passed to qp)
-    @keyword regex: treat all terms as regular expression (passed to qp)
-    @rtype: SearchResults instance
-    @return: search results
+    :param request: current request
+    :param query: the expression (string or query objects) we want to search for
+    :keyword sort: sorting of the search results, either 'weight' or 'page_name'
+    :keyword mtime: only items modified since mtime
+    :keyword historysearch: include older revisions of items in search
+    :keyword titlesearch: treat all terms as title searches (passed to qp)
+    :keyword case: do case sensitive search (passed to qp)
+    :keyword regex: treat all terms as regular expression (passed to qp)
+    :rtype: SearchResults instance
+    :returns: search results
     """
     return _get_searcher(request, query, sort, mtime, historysearch, **kw).run()
 

MoinMoin/search/builtin.py

 
     def __init__(self, request, xapian_dir, queuename, timeout=10.0):
         """
-        @param request: request object
-        @param xapian_dir: the xapian main directory
-        @param queuename: name of the queue (used for caching key)
-        @param timeout: lock acquire timeout
+        :param request: request object
+        :param xapian_dir: the xapian main directory
+        :param queuename: name of the queue (used for caching key)
+        :param timeout: lock acquire timeout
         """
         self.request = request
         self.xapian_dir = xapian_dir
     def put(self, pagename, attachmentname=None, revno=None):
         """ Put an entry into the queue (append at end)
 
-        @param pagename: page name [unicode]
-        @param attachmentname: attachment name [unicode]
-        @param revno: revision number (int) or None (all revs)
+        :param pagename: page name [unicode]
+        :param attachmentname: attachment name [unicode]
+        :param revno: revision number (int) or None (all revs)
         """
         cache = self.get_cache(locking=False) # we lock manually
         cache.lock('w', 60.0)
 
     def __init__(self, request):
         """
-        @param request: current request
+        :param request: current request
         """
         self.request = request
         self.main_dir = self._main_dir()
     def _search(self, query):
         """ Actually perfom the search
 
-        @param query: the search query objects tree
+        :param query: the search query objects tree
         """
         raise NotImplemented('...')
 
     def search(self, query, **kw):
         """ Search for items in the index
 
-        @param query: the search query objects to pass to the index
+        :param query: the search query objects to pass to the index
         """
         return self._search(query, **kw)
 
     def update_item(self, pagename, attachmentname=None, revno=None, now=True):
         """ Update a single item (page or attachment) in the index
 
-        @param pagename: the name of the page to update
-        @param attachmentname: the name of the attachment to update
-        @param revno: a specific revision number (int) or None (all revs)
-        @param now: do all updates now (default: True)
+        :param pagename: the name of the page to update
+        :param attachmentname: the name of the attachment to update
+        :param revno: a specific revision number (int) or None (all revs)
+        :param now: do all updates now (default: True)
         """
         self.update_queue.put(pagename, attachmentname, revno)
         if now:
     def indexPages(self, files=None, mode='update', pages=None):
         """ Index pages (and files, if given)
 
-        @param files: iterator or list of files to index additionally
-        @param mode: set the mode of indexing the pages, either 'update' or 'add'
-        @param pages: list of pages to index, if not given, all pages are indexed
+        :param files: iterator or list of files to index additionally
+        :param mode: set the mode of indexing the pages, either 'update' or 'add'
+        :param pages: list of pages to index, if not given, all pages are indexed
         """
         start = time.time()
         request = self._indexingRequest(self.request)
 
         This should be called from indexPages only!
 
-        @param request: current request
-        @param files: iterator or list of files to index additionally
-        @param mode: set the mode of indexing the pages, either 'update' or 'add'
-        @param pages: list of pages to index, if not given, all pages are indexed
+        :param request: current request
+        :param files: iterator or list of files to index additionally
+        :param mode: set the mode of indexing the pages, either 'update' or 'add'
+        :param pages: list of pages to index, if not given, all pages are indexed
 
         """
         raise NotImplemented('...')
     def do_queued_updates(self, amount=-1):
         """ Perform updates in the queues
 
-        @param request: the current request
-        @keyword amount: how many updates to perform at once (default: -1 == all)
+        :param request: the current request
+        :keyword amount: how many updates to perform at once (default: -1 == all)
         """
         raise NotImplemented('...')
 
     def contentfilter(self, filename):
         """ Get a filter for content of filename and return unicode content.
 
-        @param filename: name of the file
+        :param filename: name of the file
         """
         mt = wikiutil.MimeType(filename=filename)
         return mt.mime_type(), u'not implemented' # XXX see moin 1.9 code about how it was done there
         read any page. Without this policy some pages will not render,
         which will create broken pagelinks index.
 
-        @param request: current request
+        :param request: current request
         """
         import copy
         from MoinMoin.security import Permissions
 
     def __init__(self, request, query, sort='weight', mtime=None, historysearch=0):
         """
-        @param request: current request
-        @param query: search query objects tree
-        @keyword sort: the sorting of the results (default: 'weight')
-        @keyword mtime: only show items newer than this timestamp (default: None)
-        @keyword historysearch: whether to show old revisions of a page (default: 0)
+        :param request: current request
+        :param query: search query objects tree
+        :keyword sort: the sorting of the results (default: 'weight')
+        :keyword mtime: only show items newer than this timestamp (default: None)
+        :keyword historysearch: whether to show old revisions of a page (default: 0)
         """
         self.request = request
         self.query = query
         """
         Filter out deleted or acl protected pages
 
-        @param hits: list of hits
+        :param hits: list of hits
         """
         userMayRead = flaskg.user.may.read
         fs_rootpage = self.fs_rootpage + "/"
         """
         Get all matches
 
-        @param page: the current page instance
+        :param page: the current page instance
         """
         if page:
             return self.query.search(page)

MoinMoin/search/queryparser/__init__.py

 
     def __init__(self, **kw):
         """
-        @keyword titlesearch: treat all terms as title searches
-        @keyword case: do case sensitive search
-        @keyword regex: treat all terms as regular expressions
+        :keyword titlesearch: treat all terms as title searches
+        :keyword case: do case sensitive search
+        :keyword regex: treat all terms as regular expressions
         """
         self.titlesearch = kw.get('titlesearch', 0)
         self.case = kw.get('case', 0)

MoinMoin/search/queryparser/expressions.py

     def __init__(self, pattern, use_re=False, case=False):
         """ Init a text search
 
-        @param pattern: pattern to search for, ascii string or unicode
-        @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool
+        :param pattern: pattern to search for, ascii string or unicode
+        :param use_re: treat pattern as re of plain text, bool
+        :param case: do case sensitive search, bool
         """
         self._pattern = unicode(pattern)
         self.negated = 0
     def search(self, page):
         """ Search page with terms
 
-        @param page: the page instance
+        :param page: the page instance
         """
         # XXX Do we have any reason to sort here? we are not breaking out
         # of the search in any case.
     def __init__(self, pattern, use_re=False, case=True):
         """ Init a link search
 
-        @param pattern: pattern to search for, ascii string or unicode
-        @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool
+        :param pattern: pattern to search for, ascii string or unicode
+        :param use_re: treat pattern as re of plain text, bool
+        :param case: do case sensitive search, bool
         """
 
         super(LinkSearch, self).__init__(pattern, use_re, case)
     def __init__(self, pattern, use_re=False, case=False):
         """ Init a language search
 
-        @param pattern: pattern to search for, ascii string or unicode
-        @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool
+        :param pattern: pattern to search for, ascii string or unicode
+        :param use_re: treat pattern as re of plain text, bool
+        :param case: do case sensitive search, bool
         """
         # iso language code, always lowercase and not case-sensitive
         super(LanguageSearch, self).__init__(pattern.lower(), use_re, case=False)
     def __init__(self, pattern, use_re=False, case=False):
         """ Init a mimetype search
 
-        @param pattern: pattern to search for, ascii string or unicode
-        @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool
+        :param pattern: pattern to search for, ascii string or unicode
+        :param use_re: treat pattern as re of plain text, bool
+        :param case: do case sensitive search, bool
         """
         # always lowercase and not case-sensitive
         super(MimetypeSearch, self).__init__(pattern.lower(), use_re, case=False)
     def __init__(self, pattern, use_re=False, case=False):
         """ Init a domain search
 
-        @param pattern: pattern to search for, ascii string or unicode
-        @param use_re: treat pattern as re of plain text, bool
-        @param case: do case sensitive search, bool
+        :param pattern: pattern to search for, ascii string or unicode
+        :param use_re: treat pattern as re of plain text, bool
+        :param case: do case sensitive search, bool
         """
         # always lowercase and not case-sensitive
         super(DomainSearch, self).__init__(pattern.lower(), use_re, case=False)

MoinMoin/search/results.py

 
         Summarize the weight of all page matches
 
-        @param unique: ignore identical matches
-        @rtype: int
-        @return: page weight
+        :param unique: ignore identical matches
+        :rtype: int
+        :returns: page weight
         """
         weight = 0
         for match in self.get_matches(unique=unique):
     def get_matches(self, unique=1, sort='start', type=Match):
         """ Return all matches of type sorted by sort
 
-        @param unique: return only unique matches (bool)
-        @param sort: match attribute to sort by (string)
-        @param type: type of match to return (Match or sub class)
-        @rtype: list
-        @return: list of matches
+        :param unique: return only unique matches (bool)
+        :param sort: match attribute to sort by (string)
+        :param type: type of match to return (Match or sub class)
+        :rtype: list
+        :returns: list of matches
         """
         if unique:
             matches = self._unique_matches(type=type)
         The result is sorted by match.start, because its easy to remove
         duplicates like this.
 
-        @param type: type of match to return
-        @rtype: list
-        @return: list of matches of type, sorted by match.start
+        :param type: type of match to return
+        :rtype: list
+        :returns: list of matches of type, sorted by match.start
         """
         # Filter by type and sort by match.start using fast schwartzian transform.
         tmp = [(match.start, match) for match in self._matches if isinstance(match, type)]
     def stats(self, request, formatter, hitsFrom):
         """ Return search statistics, formatted with formatter
 
-        @param request: current request
-        @param formatter: formatter to use
-        @param hitsFrom: current position in the hits
-        @rtype: unicode
-        @return: formatted statistics
+        :param request: current request
+        :param formatter: formatter to use
+        :param hitsFrom: current position in the hits
+        :rtype: unicode
+        :returns: formatted statistics
         """
         if not self.estimated_hits:
             self.estimated_hits = ('', len(self.hits))
             paging=True, hitsFrom=0, hitsInfo=0):
         """ Format a list of found pages
 
-        @param request: current request
-        @param formatter: formatter to use
-        @param info: show match info in title
-        @param numbered: use numbered list for display
-        @param paging: toggle paging
-        @param hitsFrom: current position in the hits
-        @param hitsInfo: toggle hits info line
-        @rtype: unicode
-        @return: formatted page list
+        :param request: current request
+        :param formatter: formatter to use
+        :param info: show match info in title
+        :param numbered: use numbered list for display
+        :param paging: toggle paging
+        :param hitsFrom: current position in the hits
+        :param hitsInfo: toggle hits info line
+        :rtype: unicode
+        :returns: formatted page list
         """
         self._reset(request, formatter)
         f = formatter
                             maxlines=1, paging=True, hitsFrom=0, hitsInfo=0):
         """ Format a list of found pages with context
 
-        @param request: current request
-        @param formatter: formatter to use
-        @param info: show match info near the page link
-        @param context: how many characters to show around each match.
-        @param maxlines: how many contexts lines to show.
-        @param paging: toggle paging
-        @param hitsFrom: current position in the hits
-        @param hitsInfo: toggle hits info line
-        @rtype: unicode
-        @return: formatted page list with context
+        :param request: current request
+        :param formatter: formatter to use
+        :param info: show match info near the page link
+        :param context: how many characters to show around each match.
+        :param maxlines: how many contexts lines to show.
+        :param paging: toggle paging
+        :param hitsFrom: current position in the hits
+        :param hitsInfo: toggle hits info line
+        :rtype: unicode
+        :returns: formatted page list with context
         """
         self._reset(request, formatter)
         f = formatter
         Try to find the first match in the page text. If we can't find
         one, we return the first match and start=0.
 
-        @rtype: tuple
-        @return: index of first match, start of text
+        :rtype: tuple
+        :returns: index of first match, start of text
         """
         header = page.page.getPageHeader()
         start = len(header)
         Add context around each match. If there is no room for context
         before or after the match, show more context on the other side.
 
-        @param context: context length
-        @param match: current match
-        @param start: context should not start before that index, unless
+        :param context: context length
+        :param match: current match
+        :param start: context should not start before that index, unless
                       end is past the last character.
-        @param last: last character index
-        @rtype: tuple
-        @return: start, end of context
+        :param last: last character index
+        :rtype: tuple
+        :returns: start, end of context
         """
         # Start by giving equal context on both sides of match
         contextlen = max(context - len(match), 0)
 
         Invoke format match on all unique matches in page title.
 
-        @param page: found page
-        @rtype: unicode
-        @return: formatted title
+        :param page: found page
+        :rtype: unicode
+        :returns: formatted title
         """
         # Get unique title matches sorted by match.start
         matches = page.get_matches(unique=1, sort='start', type=TitleMatch)
         text. Matches behind location are ignored and an empty string is
         returned.
 
-        @param body: text containing match
-        @param match: search match in text
-        @param location: current location in text
-        @rtype: unicode
-        @return: formatted match or empty string
+        :param body: text containing match
+        :param match: search match in text
+        :param location: current location in text
+        :rtype: unicode
+        :returns: formatted match or empty string
         """
         start = max(location, match.start)
         if start < match.end:
     def formatPageLinks(self, hitsFrom, hitsPerPage, hitsNum):
         """ Format previous and next page links in page
 
-        @param hitsFrom: current position in the hits
-        @param hitsPerPage: number of hits per page
-        @param hitsNum: number of hits
-        @rtype: unicode
-        @return: links to previous and next pages (if exist)
+        :param hitsFrom: current position in the hits
+        :param hitsPerPage: number of hits per page
+        :param hitsNum: number of hits
+        :rtype: unicode
+        :returns: links to previous and next pages (if exist)
         """
         f = self.formatter
         querydict = dict(wikiutil.parseQueryString(self.request.query_string))
     def formatHitInfoBar(self, page):
         """ Returns the code for the information below a search hit
 
-        @param page: the FoundPage instance
+        :param page: the FoundPage instance
         """
         request = self.request
         f = self.formatter
     def querystring(self, querydict=None):
         """ Return query string, used in the page link
 
-        @keyword querydict: use these parameters (default: None)
+        :keyword querydict: use these parameters (default: None)
         """
         if querydict is None:
             querydict = {}
     def formatInfo(self, formatter, page):
         """ Return formatted match info
 
-        @param formatter: the formatter instance to use
-        @param page: the current page instance
+        :param formatter: the formatter instance to use
+        :param page: the current page instance
         """
         template = u' . . . %s %s'
         template = u"%s%s%s" % (formatter.span(1, css_class="info"),
 
         Each request might need different translations or other user preferences.
 
-        @param request: current request
-        @param formatter: the formatter instance to use
+        :param request: current request
+        :param formatter: the formatter instance to use
         """
         self.buffer = StringIO.StringIO()
         self.formatter = formatter
 def getSearchResults(request, query, hits, start, sort, estimated_hits):
     """ Return a SearchResults object with the specified properties
 
-    @param request: current request
-    @param query: the search query object tree
-    @param hits: list of hits
-    @param start: position to start showing the hits
-    @param sort: sorting of the results, either 'weight' or 'page_name'
-    @param estimated_hits: if true, use this estimated hit count
+    :param request: current request
+    :param query: the search query object tree
+    :param hits: list of hits
+    :param start: position to start showing the hits
+    :param sort: sorting of the results, either 'weight' or 'page_name'
+    :param estimated_hits: if true, use this estimated hit count
     """
     result_hits = []
     for wikiname, page, attachment, match, rev in hits:

MoinMoin/search/term.py

         Evaluate this term and return True or False if the
         item identified by the parameters matches.
 
-        @param item: the item
+        :param item: the item
         """
         assert hasattr(self, '_result')
 

MoinMoin/security/__init__.py

         if attr is one of the rights in acl_rights_valid, then return a
         checking function for it. Else raise an AttributeError.
 
-        @param attr: one of ACL rights as defined in acl_rights_valid
-        @rtype: function
-        @return: checking function for that right, accepting an itemname
+        :param attr: one of ACL rights as defined in acl_rights_valid
+        :rtype: function
+        :returns: checking function for that right, accepting an itemname
         """
         if attr not in app.cfg.acl_rights_valid:
             raise AttributeError(attr)
 
         This can be used in multiple subsequent calls to process longer lists.
 
-        @param aclstring: acl string from item or configuration
-        @param remember: should add the line to self.acl_lines
+        :param aclstring: acl string from item or configuration
+        :param remember: should add the line to self.acl_lines
         """
         # Remember lines
         if remember:
     def __init__(self, rights, aclstring):
         """ Initialize acl iterator
 
-        @param rights: the acl rights to consider when parsing
-        @param aclstring: string to parse
+        :param rights: the acl rights to consider when parsing
+        :param aclstring: string to parse
         """
         self.rights = rights
         self.rest = aclstring.strip()
         raises a StopIteration. The iterator finishes as soon as the
         string is fully parsed or can not be parsed any more.
 
-        @rtype: 3 tuple - (modifier, [entry, ...], [right, ...])
-        @return: values for one item in an acl string
+        :rtype: 3 tuple - (modifier, [entry, ...], [right, ...])
+        :returns: values for one item in an acl string
         """
         # Handle finished state, required by iterator protocol
         if self.rest == '':

MoinMoin/security/textcha.py

     def __init__(self, form):
         """ Initialize the TextCha.
 
-            @param form: flatland form to use; must subclass TextChaizedForm
+            :param form: flatland form to use; must subclass TextChaizedForm
         """
         self.user_info = flaskg.user.valid and flaskg.user.name or request.remote_addr
         self.textchas = self._get_textchas()
     def init_qa(self, question=None):
         """ Initialize the question / answer.
 
-         @param question: If given, the given question will be used.
+         :param question: If given, the given question will be used.
                           If None, a new question will be generated.
         """
         if self.is_enabled():

MoinMoin/security/ticket.py

 def createTicket(tm=None, **kw):
     """ Create a ticket using a configured secret
 
-        @param tm: unix timestamp (optional, uses current time if not given)
-        @param kw: key/value stuff put into ticket, must be same for ticket
+        :param tm: unix timestamp (optional, uses current time if not given)
+        :param kw: key/value stuff put into ticket, must be same for ticket
                    creation and ticket check
     """
     if tm is None:
 def checkTicket(ticket, **kw):
     """ Check validity of a previously created ticket.
 
-        @param ticket: a str as created by createTicket
-        @param kw: see createTicket kw
+        :param ticket: a str as created by createTicket
+        :param kw: see createTicket kw
     """
     try:
         timestamp_str = ticket.split('.')[0]

MoinMoin/storage/__init__.py

         Takes a MoinMoin search term and returns an iterator (maybe empty) over
         matching item objects (NOT item names!).
 
-        @type searchterm: MoinMoin search term
-        @param searchterm: The term for which to search.
-        @rtype: iterator of item objects
+        :type searchterm: MoinMoin search term
+        :param searchterm: The term for which to search.
+        :rtype: iterator of item objects
         """
         # Very simple implementation because we have no indexing
         # or anything like that. If you want to optimize this, override it.
 
         When implementing this, don't rely on has_item unless you've overridden it.
 
-        @type itemname: unicode
-        @param itemname: The name of the item we want to get.
-        @rtype: item object
-        @raise NoSuchItemError: No item with name 'itemname' is known to this backend.
+        :type itemname: unicode
+        :param itemname: The name of the item we want to get.
+        :rtype: item object
+        :raises NoSuchItemError: No item with name 'itemname' is known to this backend.
         """
         raise NotImplementedError()
 
         This method is added for convenience. With it you don't need to try get_item
         and catch an exception that may be thrown if the item doesn't exist yet.
 
-        @type itemname: unicode
-        @param itemname: The name of the item of which we want to know whether it exists.
-        @rtype: bool
+        :type itemname: unicode
+        :param itemname: The name of the item of which we want to know whether it exists.
+        :rtype: bool
         """
         try:
             self.get_item(itemname)
         Creates an item with a given itemname. If that item already exists,
         raise an exception.
 
-        @type itemname: unicode
-        @param itemname: Name of the item we want to create.
-        @rtype: item object
-        @raise ItemAlreadyExistsError: The item you were trying to create already exists.
+        :type itemname: unicode
+        :param itemname: Name of the item we want to create.
+        :rtype: item object
+        :raises ItemAlreadyExistsError: The item you were trying to create already exists.
         """
         raise NotImplementedError()
 
         Returns an iterator over all items available in this backend (like the
         dict method).
 
-        @rtype: iterator of item objects
+        :rtype: iterator of item objects
         """
         raise NotImplementedError()
 
               another) requires that the iterator goes over really every
               revision we have.
 
-        @type reverse: bool
-        @param reverse: Indicate whether the iterator should go in reverse order.
-        @rtype: iterator of revision objects
+        :type reverse: bool
+        :param reverse: Indicate whether the iterator should go in reverse order.
+        :rtype: iterator of revision objects
         """
         # generic and slow history implementation
         revs = []
         of that item.
         Note: If you pass -1 as revno, this shall return the latest revision of the item.
 
-        @type item: Object of class Item.
-        @param item: The Item on which we want to operate.
-        @type revno: int
-        @param revno: Indicate which revision is wanted precisely. If revno is
+        :type item: Object of class Item.
+        :param item: The Item on which we want to operate.
+        :type revno: int
+        :param revno: Indicate which revision is wanted precisely. If revno is
         -1, return the most recent revision.
-        @rtype: Object of class Revision
-        @raise NoSuchRevisionError: No revision with that revno was found on item.
+        :rtype: Object of class Revision
+        :raises NoSuchRevisionError: No revision with that revno was found on item.
         """
         raise NotImplementedError()
 
         Since we allow to totally destroy certain revisions, list_revisions does
         not need to return subsequent, but only monotone revision numbers.
 
-        @type item: Object of class Item.
-        @param item: The Item on which we want to operate.
-        @return: list of ints (possibly empty)
+        :type item: Object of class Item.
+        :param item: The Item on which we want to operate.
+        :returns: list of ints (possibly empty)
         """
         raise NotImplementedError()
 
         greater than the revision number of the item's most recent revision.
         The newly created revision object is returned to the caller.
 
-        @type item: Object of class Item.
-        @param item: The Item on which we want to operate.
-        @type revno: int
-        @param revno: Indicate which revision we want to create.
+        :type item: Object of class Item.
+        :param item: The Item on which we want to operate.
+        :type revno: int
+        :param revno: Indicate which revision we want to create.
         @precondition: item.get_revision(-1).revno < revno
-        @return: Object of class Revision.
-        @raise RevisionAlreadyExistsError: Raised if a revision with that number
+        :returns: Object of class Revision.
+        :raises RevisionAlreadyExistsError: Raised if a revision with that number
         already exists on item.
-        @raise RevisionNumberMismatchError: Raised if precondition is not
+        :raises RevisionNumberMismatchError: Raised if precondition is not
         fulfilled.
         """
         raise NotImplementedError()
               least ignore the existence of the revision in question. (The only hint will
               be the gap in item.list_revisions().
 
-        @type revision: Object of class StoredRevision
-        @param revision: The revision we want to destroy completely.
-        @raises CouldNotDestroyError: Raised in case the revision could not be destroyed.
+        :type revision: Object of class StoredRevision
+        :param revision: The revision we want to destroy completely.
+        :raises CouldNotDestroyError: Raised in case the revision could not be destroyed.
         """
         raise NotImplementedError()
 
         Renames a given item. Raises Exception if the item you are trying to rename
         does not exist or if the newname is already chosen by another item.
 
-        @type item: Object of class Item.
-        @param item: The Item on which we want to operate.
-        @type newname: string
-        @param newname: Name of item after this operation has succeeded.
+        :type item: Object of class Item.
+        :param item: The Item on which we want to operate.
+        :type newname: string
+        :param newname: Name of item after this operation has succeeded.
         @precondition: self.has_item(newname) == False
         @postcondition: self.has_item(newname) == True
-        @raises ItemAlreadyExistsError: Raised if an item with name 'newname'
+        :raises ItemAlreadyExistsError: Raised if an item with name 'newname'
         already exists.
-        @return: None
+        :returns: None
         """
         raise NotImplementedError()
 
         commit() it. You need to pass the revision you want to commit. The item
         can be looked up by the revision's 'item' property.
 
-        @type revision: Object of class NewRevision.
-        @param revision: The revision we want to commit to  storage.
-        @return: None
+        :type revision: Object of class NewRevision.
+        :param revision: The revision we want to commit to  storage.
+        :returns: None
         """
         raise NotImplementedError()
 
         This method is invoked when external events happen that cannot be handled in a
         sane way and thus the changes that have been made must be rolled back.
 
-        @type revision: Object of class NewRevision.
-        @param revision: The revision we want to roll back.
-        @return: None
+        :type revision: Object of class NewRevision.
+        :param revision: The revision we want to roll back.
+        :returns: None
         """
         raise NotImplementedError()
 
               from time to time to get rid of the stuff, or not choose a backend of this
               kind (in case disk space is limited and large items are uploaded).
 
-        @type item: Object of class Item
-        @param item: The item we want to destroy
-        @raises CouldNotDestroyError: Raised in case the revision could not be destroyed.
-        @return: None
+        :type item: Object of class Item
+        :param item: The item we want to destroy
+        :raises CouldNotDestroyError: Raised in case the revision could not be destroyed.
+        :returns: None
         """
         # XXX Should this perhaps return a bool indicating whether erasure was actually performed on disk or something like that?
         raise NotImplementedError()
         As you can see, the lock acquired by this method is released by calling
         the publish_metadata() method on the item.
 
-        @type item: Object of class Item.
-        @param item: The Item on which we want to operate.
+        :type item: Object of class Item.
+        :param item: The Item on which we want to operate.
         @precondition: item not already locked
-        @return: None
+        :returns: None
         """
         raise NotImplementedError()
 
 
         The lock this method releases is acquired by the _change_metadata method.
 
-        @type item: Object of class Item.
-        @param item: The Item on which we want to operate.
-        @raise AssertionError: item was not locked XXX use more special exception
-        @return: None
+        :type item: Object of class Item.
+        :param item: The Item on which we want to operate.
+        :raises AssertionError: item was not locked XXX use more special exception
+        :returns: None
         """
         raise NotImplementedError()
 
         Called to read a given amount of bytes of a revision's data. By default, all
         data is read.
 
-        @type revision: Object of class StoredRevision.
-        @param revision: The revision on which we want to operate.
-        @type chunksize: int
-        @param chunksize: amount of bytes to be read at a time
-        @return: string
+        :type revision: Object of class StoredRevision.
+        :param revision: The revision on which we want to operate.
+        :type chunksize: int
+        :param chunksize: amount of bytes to be read at a time
+        :returns: string
         """
         raise NotImplementedError()
 
         """
         When this method is called, the passed data is written to the revision's data.
 
-        @type revision: Object of class NewRevision.
-        @param revision: The revision on which we want to operate.
-        @type data: str
-        @param data: The data to be written on the revision.
-        @return: None
+        :type revision: Object of class NewRevision.
+        :param revision: The revision on which we want to operate.
+        :type data: str
+        :param data: The data to be written on the revision.
+        :returns: None
         """
         raise NotImplementedError()
 
         """
         Load metadata for a given item, return dict.
 
-        @type item: Object of class Item.
-        @param item: The Item on which we want to operate.
-        @return: dict of metadata key / value pairs.
+        :type item: Object of class Item.
+        :param item: The Item on which we want to operate.
+        :returns: dict of metadata key / value pairs.
         """
         raise NotImplementedError()
 
         """
         Load metadata for a given revision, returns dict.
 
-        @type revision: Object of a subclass of Revision.
-        @param revision: The revision on which we want to operate.
-        @return: dict of metadata key / value pairs.
+        :type revision: Object of a subclass of Revision.
+        :param revision: The revision on which we want to operate.
+        :returns: dict of metadata key / value pairs.
         """
         raise NotImplementedError()
 
         be given as a parameter to StoredRevision instantiation instead.
         Return the timestamp (a long).
 
-        @type revision: Object of a subclass of Revision.
-        @param revision: The revision on which we want to operate.
-        @return: long
+        :type revision: Object of a subclass of Revision.
+        :param revision: The revision on which we want to operate.
+        :returns: long
         """
         raise NotImplementedError()
 
         if all StoredRevision objects are instantiated with the size= keyword
         parameter.
 
-        @type revision: Object of a subclass of Revision.
-        @param revision: The revision on which we want to operate.
-        @return: int
+        :type revision: Object of a subclass of Revision.
+        :param revision: The revision on which we want to operate.
+        :returns: int
         """
         raise NotImplementedError()
 
         """
         Set the revision's cursor on the revision's data.
 
-        @type revision: Object of StoredRevision.
-        @param revision: The revision on which we want to operate.
-        @type position: int
-        @param position: Indicates where to position the cursor
-        @type mode: int
-        @param mode: 0 for 'absolute positioning', 1 to seek 'relatively to the
+        :type revision: Object of StoredRevision.
+        :param revision: The revision on which we want to operate.
+        :type position: int
+        :param position: Indicates where to position the cursor
+        :type mode: int
+        :param mode: 0 for 'absolute positioning', 1 to seek 'relatively to the
         current position', 2 to seek 'relative to the files end'.
-        @return: None
+        :returns: None
         """
         raise NotImplementedError()
 
         """
         Tell the revision's cursor's position on the revision's data.
 
-        @type revision: Object of type StoredRevision.
-        @param revision: The revision on which tell() was invoked.
-        @return: int indicating the cursor's position.
+        :type revision: Object of type StoredRevision.
+        :param revision: The revision on which tell() was invoked.
+        :returns: int indicating the cursor's position.
         """
         raise NotImplementedError()
 
         """
         Initialize an item. Memorize the backend to which it belongs.
 
-        @type backend: Object of a subclass of Backend.
-        @param backend: The backend that stores this item.
-        @type itemname: unicode
-        @param itemname: The name representing this item in the backend. Unique
+        :type backend: Object of a subclass of Backend.
+        :param backend: The backend that stores this item.
+        :type itemname: unicode
+        :param itemname: The name representing this item in the backend. Unique
         within the backend.
         """
         self._backend = backend
         You must wrap write accesses to metadata in change_metadata/publish_metadata calls.
         Keys starting with two underscores are reserved and cannot be used.
 
-        @type key: str or unicode
-        @param key: The keyword that is used to look up the corresponding value.
-        @type value: str, unicode, int, long, float, bool, complex or a nested tuple thereof.
-        @param value: The value that is referenced by the keyword `key` in this
+        :type key: str or unicode
+        :param key: The keyword that is used to look up the corresponding value.
+        :type value: str, unicode, int, long, float, bool, complex or a nested tuple thereof.
+        :param value: The value that is referenced by the keyword `key` in this
         specific item's metadata dict.
         """
         if not self._locked:
         """
         Delete an item metadata key/value pair.
 
-        @type key: str or unicode
-        @param key: Key identifying a unique key/value pair in this item's metadata.
+        :type key: str or unicode
+        :param key: Key identifying a unique key/value pair in this item's metadata.
         @postcondition: self[key] raises KeyError
         """
         if not self._locked:
         See __setitem__.__doc__ -- You may use my_item["key"] to get the corresponding
         metadata value. Note however, that the key you pass must be of type str or unicode.
 
-        @type key: str or unicode
-        @param key: The key refering to the value we want to return.
-        @return: self._metadata[key]
+        :type key: str or unicode
+        :param key: The key refering to the value we want to return.
+        :returns: self._metadata[key]
         """
         self._read_accessed = True
         if not isinstance(key, (unicode, str)):
         This method returns a list of all metadata keys of this item (i.e., a list of Strings.)
         That allows using Python's `for mdkey in itemobj: do_something` syntax.
 
-        @return: list of metadata keys not starting with two leading underscores
+        :returns: list of metadata keys not starting with two leading underscores
         """
         if self._metadata is None:
             self._metadata = self._backend._get_item_metadata(self)
         """
         Initialize the revision.
 
-        @type item: Object of class Item.
-        @param item: The item to which this revision belongs.
-        @type revno: int
-        @param revno: The unique number identifying this revision on the item.
-        @type timestamp: int
-        @param timestamp: int representing the UNIX time this revision was
+        :type item: Object of class Item.
+        :param item: The item to which this revision belongs.
+        :type revno: int
+        :param revno: The unique number identifying this revision on the item.
+        :type timestamp: int
+        :param timestamp: int representing the UNIX time this revision was
         created. (UNIX time: seconds since the epoch, i.e. 1st of January 1970, 00:00 UTC)
         """
         self._revno = revno
         Internal method used for dict-like access to the NewRevisions metadata-dict.
         Keys starting with two underscores are reserved and cannot be used.
 
-        @type key: str or unicode
-        @param key: The keyword that is used to look up the corresponding value.
-        @type value: str, unicode, int, long, float, bool, complex or a nested tuple thereof.
-        @param value: The value that is referenced by the keyword `key` in this
+        :type key: str or unicode
+        :param key: The keyword that is used to look up the corresponding value.
+        :type value: str, unicode, int, long, float, bool, complex or a nested tuple thereof.
+        :param value: The value that is referenced by the keyword `key` in this
         specific items metadata-dict.
         """
         if not isinstance(key, (str, unicode)):
     str, unicode, bool, int, long, float, complex and tuple.
     Since tuples can contain other types, we need to check the types recursively.
 
-    @type value: str, unicode, int, long, float, complex, tuple
-    @param value: A value of which we want to know if it is a valid metadata value.
-    @return: bool
+    :type value: str, unicode, int, long, float, complex, tuple
+    :param value: A value of which we want to know if it is a valid metadata value.
+    :returns: bool
     """
     accepted = (bool, str, unicode, int, long, float, complex)
     if isinstance(value, accepted):

MoinMoin/storage/backends/_fsutils.py

     charset. The default value of config.charset, 'utf-8' can encode any
     character.
 
-    @param wikiname: wiki name [unicode]
-    @param charset: charset to encode string (before quoting)
-    @rtype: string
-    @return: quoted name, safe for any file system
+    :param wikiname: wiki name [unicode]
+    :param charset: charset to encode string (before quoting)
+    :rtype: string
+    :returns: quoted name, safe for any file system
     """
     filename = wikiname.encode(charset)
 
 
     raises an InvalidFileNameError in case of unquoting problems.
 
-    @param filename: quoted wiki name
-    @param charset: charset to use for decoding (after unquoting)
-    @rtype: unicode
-    @return: WikiName
+    :param filename: quoted wiki name
+    :param charset: charset to use for decoding (after unquoting)
+    :rtype: unicode
+    :returns: WikiName
     """
     # From some places we get called with Unicode strings
     if isinstance(filename, unicode):

MoinMoin/storage/backends/acl.py

     """
     def __init__(self, cfg, backend, hierarchic=False, before=u"", default=u"", after=u"", valid=None):
         """
-        @type backend: Some object that implements the storage API.
-        @param backend: The unprotected backend that we want to protect.
-        @type hierarchic: bool
-        @param hierarchic: Indicate whether we want to process ACLs in hierarchic mode.
-        @type before: unicode
-        @param before: ACL to be applied before all the other ACLs.
-        @type default: unicode
-        @param default: If no ACL information is given on the item in question, use this default.
-        @type after: unicode
-        @param after: ACL to be applied after all the other ACLs.
-        @type valid: list of strings or None
-        @param valid: If a list is given, only strings in the list are treated as valid acl privilege descriptors.
+        :type backend: Some object that implements the storage API.
+        :param backend: The unprotected backend that we want to protect.
+        :type hierarchic: bool
+        :param hierarchic: Indicate whether we want to process ACLs in hierarchic mode.
+        :type before: unicode
+        :param before: ACL to be applied before all the other ACLs.
+        :type default: unicode
+        :param default: If no ACL information is given on the item in question, use this default.
+        :type after: unicode
+        :param after: ACL to be applied after all the other ACLs.
+        :type valid: list of strings or None
+        :param valid: If a list is given, only strings in the list are treated as valid acl privilege descriptors.
                       If None is give, the global wiki default is used.
         """
         self.cfg = cfg
         `default` is only used if there is no ACL on the item (and none on
         any of the item's parents when using hierarchic.)
 
-        @param itemname: item to get permissions from
-        @param right: the right to check
+        :param itemname: item to get permissions from
+        :param right: the right to check
 
-        @rtype: bool
-        @return: True if you have permission or False
+        :rtype: bool
+        :returns: True if you have permission or False
         """
         username = flaskg.user.name
 
     """
     def __init__(self, item, aclbackend):
         """
-        @type item: Object adhering to the storage item API.
-        @param item: The unprotected item we want to wrap.
-        @type aclbackend: Instance of AclWrapperBackend.
-        @param aclbackend: The AMW this item belongs to.
+        :type item: Object adhering to the storage item API.
+        :param item: The unprotected item we want to wrap.
+        :type aclbackend: Instance of AclWrapperBackend.
+        :param aclbackend: The AMW this item belongs to.
         """
         self._backend = aclbackend
         self._item = item
         that represent the permissions to check, such as READ and WRITE
         (see module level constants; don't pass strings, please).
 
-        @type privileges: List of strings.
-        @param privileges: Represent the privileges to check.
+        :type privileges: List of strings.
+        :param privileges: Represent the privileges to check.
         """
         def wrap(f):
             def wrapped_f(self, *args, **kwargs):
     """
     def __init__(self, revision, item):
         """
-        @type revision: Object adhering to the storage revision API.
-        @param revision: The revision we want to protect.
-        @type item: Object adhering to the storage item API.
-        @param item: The item this revision belongs to
+        :type revision: Object adhering to the storage revision API.
+        :param revision: The revision we want to protect.
+        :type item: Object adhering to the storage item API.
+        :param item: The item this revision belongs to
         """
         self._revision = revision
         self._item = item

MoinMoin/storage/backends/fileserver.py

         """
         Initialise file serving backend.
 
-        @type root_dir: unicode
-        @param root_dir: root directory below which we serve files
+        :type root_dir: unicode
+        :param root_dir: root directory below which we serve files
         """
         root_dir = root_dir.rstrip('/')
         assert root_dir