Closed
Description
numpydoc generates rather verbose outputs for namedtuples, especially when combined with autosummary:
$ sphinx-quickstart -q -m --sep -pfoo -afoo --extensions=sphinx.ext.autosummary,numpydoc
then edit source/index.rst
to contain
.. autosummary::
foo.Foo
.. automodule:: foo
:members:
and foo.py
to contain
from collections import namedtuple
Foo = namedtuple("Foo", "bar baz")
then build with
PYTHONPATH=. make html
Compare with the result using either not numpydoc at all, or sphinx.ext.napoleon instead:
I guess whether "count" and "index" should be listed as methods can be argued over, but having "bar" and "baz" being listed twice seems clearly too much, and the "Attributes" entry in the autosummary table is not so great either.
Metadata
Metadata
Assignees
Labels
No labels