[Yum-devel] [PATCH] Adds documentation for the output module.
James Antill
james at fedoraproject.org
Mon Jul 11 13:28:57 UTC 2011
On Fri, 2011-07-08 at 16:44 -0400, Nick Jacek wrote:
> ---
> output.py | 651 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
> 1 files changed, 576 insertions(+), 75 deletions(-)
[...]
> @@ -473,10 +637,21 @@ class YumOutput:
> return (val, width, hibeg, hiend)
>
> def fmtColumns(self, columns, msg=u'', end=u'', text_width=utf8_width):
> - """ Return a string for columns of data, which can overflow.
> - text_width parameter finds the width of columns, this defaults to
> - utf8 but can be changed to len() if you know it'll be fine. """
> -
> + """Return a row of data formatted into a string for output.
> + Items can overflow their columns.
> +
> +vvvvvvvvvvvvvvvvvvvvf
> + :param columns: a list of tuples containing the data to
> + output. Each tuple contains first the item to be output,
> + then the amount of space allocated for the column, and then
> + optionally a type of highlighting for the item
> + :param msg: a string to begin the line of output with
> + :param end: a string to end the line of output with
> + :param text_width: a function to find the width of the items
> + in the columns. This defaults to utf8 but can be changed
> + to len() if you know it'll be fine
> + :return: a row of data formatted into a string for output
> + """
The V's have attacked! ;)
[...]
> def pkgAdded(self, pkgtup, mode):
> + """Print information about a package being added to the
> + transaction set.
> +
> + :param pkgtup: tuple containing the package name, arch,
> + version, and repository
> + :param mode: a short string indicating why the package is
> + being added to the transaction set.
> +
> + Valid values for *mode* are::
> +
> + i = the package will be installed
> + u = the package will be an update
> + e = the package will be erased
> + r = the package will be reinstalled
> + d = the package will be a downgrade
> + o = the package will be obsoleting another package
> + ud = the package will be updated
> + od = the package will be obsoleted
> + """
Should probably say "current" values ... and/or see transactioninfo
etc. (although we should be updating it now ;).
More information about the Yum-devel
mailing list