# HG changeset patch # User osimons # Date 1252576263 0 # Node ID 639e5c466c96afd206d0adbcb5e706a1ff222505 # Parent dee4ca27d5293b8ab6cf59ba742b94ede164d08a 0.6dev: Documentation fixes for all `build_doc` errors and warnings. diff --git a/bitten/api.py b/bitten/api.py --- a/bitten/api.py +++ b/bitten/api.py @@ -80,9 +80,9 @@ def render_summary(req, config, build, step, category): """Render a summary for the given report. - This function should return a tuple of the form `(template, data)`, - where `template` is the name of the template to use and `data` is the - data to be passed to the template. + This function should return a tuple of the form ``(template, data)``, + where ``template` is the name of the template to use and ``data`` is + the data to be passed to the template. :param req: the request object :param config: the build configuration @@ -108,9 +108,9 @@ def generate_chart_data(req, config, category): """Generate the data for a report chart. - This function should return a tuple of the form `(template, data)`, - where `template` is the name of the template to use and `data` is the - data to be passed to the template. + This function should return a tuple of the form ``(template, data)``, + where ``template`` is the name of the template to use and ``data`` is + the data to be passed to the template. :param req: the request object :param config: the build configuration diff --git a/bitten/build/ctools.py b/bitten/build/ctools.py --- a/bitten/build/ctools.py +++ b/bitten/build/ctools.py @@ -32,7 +32,7 @@ :param file\_: name of the configure script :param enable: names of the features to enable, seperated by spaces :param disable: names of the features to disable, separated by spaces - :param with_: names of external packages to include + :param with\_: names of external packages to include :param without: names of external packages to exclude :param cflags: ``CFLAGS`` to pass to the configure script :param cxxflags: ``CXXFLAGS`` to pass to the configure script @@ -78,8 +78,8 @@ :param install: copy missing auxiliary files :param symlink: install symbolic links instead of copies :param warnings: report the warnings falling in CATEGORY - :prepend_include: prepend directories to search path - :include: append directories to search path + :param prepend_include: prepend directories to search path + :param include: append directories to search path """ args = [] diff --git a/bitten/build/hgtools.py b/bitten/build/hgtools.py --- a/bitten/build/hgtools.py +++ b/bitten/build/hgtools.py @@ -14,7 +14,7 @@ :param ctxt: the build context :type ctxt: `Context` :param revision: the revision to check out - :param dir_: the name of a local subdirectory containing the working copy + :param dir\_: the name of a local subdirectory containing the working copy """ args = ['pull', '-u'] if revision: diff --git a/bitten/build/phptools.py b/bitten/build/phptools.py --- a/bitten/build/phptools.py +++ b/bitten/build/phptools.py @@ -8,6 +8,8 @@ # you should have received as part of this distribution. The terms # are also available at http://bitten.edgewall.org/wiki/License. +"Recipe commands for tools commonly used in PHP projects." + import logging import os import shlex diff --git a/bitten/build/shtools.py b/bitten/build/shtools.py --- a/bitten/build/shtools.py +++ b/bitten/build/shtools.py @@ -84,7 +84,6 @@ :param output: name of the file to which the output of the script should be written :param args: command-line arguments to pass to the script - :param dirs: :param filter\_: function to filter out messages from the executable stdout """ if args: diff --git a/bitten/build/svntools.py b/bitten/build/svntools.py --- a/bitten/build/svntools.py +++ b/bitten/build/svntools.py @@ -76,9 +76,9 @@ :param url: the URL of the repository :param path: the path inside the repository :param revision: the revision to check out - :param dir_: the name of a local subdirectory to check out into + :param dir\_: the name of a local subdirectory to check out into :param verbose: whether to log the list of checked out files - :param shared_path: a shared directory to do the checkout in, before copying to dir_ + :param shared_path: a shared directory to do the checkout in, before copying to dir\_ :param username: a username of the repository :param password: a password of the repository """ @@ -121,7 +121,7 @@ :param url: the URL of the repository :param path: the path inside the repository :param revision: the revision to check out - :param dir_: the name of a local subdirectory to export out into + :param dir\_: the name of a local subdirectory to export out into :param username: a username of the repository :param password: a password of the repository """ @@ -147,7 +147,7 @@ :param ctxt: the build context :type ctxt: `Context` :param revision: the revision to check out - :param dir_: the name of a local subdirectory containing the working copy + :param dir\_: the name of a local subdirectory containing the working copy """ args = ['update'] if revision: diff --git a/bitten/recipe.py b/bitten/recipe.py --- a/bitten/recipe.py +++ b/bitten/recipe.py @@ -168,7 +168,7 @@ :param file\_: the path to the file to attach, relative to base directory. :param description: description saved with attachment - :resource: which resource to attach the file to, + :param resource: which resource to attach the file to, either 'build' (default) or 'config' """ filename = self.resolve(file_) diff --git a/bitten/util/tests/xmlio.py b/bitten/util/tests/xmlio.py --- a/bitten/util/tests/xmlio.py +++ b/bitten/util/tests/xmlio.py @@ -19,10 +19,18 @@ def test_parse(self): """Tests that simple test data is parsed correctly""" - s = """\n\n \n\n \n\n \n\n""" + s = """ + + + \ + """ x = xmlio.parse(s) assert x.name == "build" + def test_Element_encoding(self): + self.assertEquals('<\xc3\xb8\xc3\xbc arg="\xc3\xa9\xe2\x82\xac"/>', + str(xmlio.Element(u'\xf8\xfc', arg=u'\xe9\u20ac'.encode('utf-8')))) + def test_ParsedElement_encoding(self): u = u'' s = '' diff --git a/bitten/util/xmlio.py b/bitten/util/xmlio.py --- a/bitten/util/xmlio.py +++ b/bitten/util/xmlio.py @@ -10,7 +10,7 @@ """Utility code for easy input and output of XML. -The current implementation uses `xml.dom.minidom` under the hood for parsing. +The current implementation uses ``xml.dom.minidom`` under the hood for parsing. """ import os @@ -168,10 +168,7 @@ ]]> Valid input are utf-8 or unicode strings, or any type easily converted - to unicode such as integers. Output is always utf-8: - - >>> print str(Element(u'\xf8\xfc', arg=u'\xe9\u20ac'.encode('utf-8'))) - <\xc3\xb8\xc3\xbc arg="\xc3\xa9\xe2\x82\xac"/> + to unicode such as integers. Output is always utf-8. """ __slots__ = ['name', 'attr']