[Python-modules-team] Bug#608942: Bug#608942: python-matplotlib-doc: spaces in arguments of Sphinx ":param" field

Sandro Tosi morph at debian.org
Thu Jan 13 20:53:35 UTC 2011


Hi,
Jakub spotted this problem with mpl and new sphinx:

On Tue, Jan 4, 2011 at 20:47, Jakub Wilk <jwilk at debian.org> wrote:
> In Sphinx 1.0, ":param" field can accept up to 2 whitespace-separated
> arguments. Unforunately, this new feature breaks a bit documentation of some
> stuff in the mpl_toolkits.axes_grid.axes_divider module, which is using
> spaces for its own purpose:
>
> $ grep -E -r 'param [^ ]* [^ ]*:' .
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param nx, nx1:
> Integers specifying the column-position of the
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param ny, ny1: same as
> nx and nx1, but for row positions.
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param nx, nx1:
> Integers specifying the column-position of the
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param ny, ny1: same as
> nx and nx1, but for row positions.
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param nx, nx1:
> Integers specifying the column-position of the
> ./lib/mpl_toolkits/axes_grid/axes_divider.py:        :param ny, ny1: same as
> nx and nx1, but for row positions.
>
> [0] See bottom of:
> http://sphinx.pocoo.org/domains.html#info-field-lists

That generates pages like this:

locate(nx, ny, nx1=None, ny1=None, renderer=None)¶
    Parameters:	

        * nx1 (nx,) – Integers specifying the column-position of the
cell. When nx1 is None, a single nx-th column is specified. Otherwise
location of columns spanning between nx to nx1 (but excluding nx1-th
column) is specified.
        * ny1 (ny,) – same as nx and nx1, but for row positions.

With the attached patch, I removed the space between those arguments,
but at least it generates a correct list even tho it's a bit visually
unpleasant.

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 50_bts608942_spaces_in_param_args.patch
Type: application/mbox
Size: 2299 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20110113/1ef0e19c/attachment.bin>


More information about the Python-modules-team mailing list