Problem with section titles included by autodoc

3,889 views
Skip to first unread message

Fredrik Johansson

unread,
Oct 21, 2008, 6:46:40 AM10/21/08
to sphin...@googlegroups.com
Hello,

I'm having trouble using section headings in docstrings included via autodoc.

See http://web.student.chalmers.se/~frejohl/docfail/ for a minimal
example (testfun.py is assumed to be in Python's path).

The following happens:
==============


C:\source\docfail>build.py
No builder selected, using default: html
Sphinx v0.4.3, building html
trying to load pickled env... done
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading... index reST markup error:
c:\source\docfail\testfun.py:docstring of testfun.fun:5: (SEVERE/4)
Unexpected section title.

Notes
-----

==============

This is with Sphinx 4.3 on Windows.

Fredrik

Pierre GM

unread,
Oct 21, 2008, 12:29:26 PM10/21/08
to sphin...@googlegroups.com
fredrik,
Looks like you're using thw numpy standard for your documentation. Consider
then using the numpydoc extensions that Pauli Virtanen implemented: it's
available here: http://sphinx.googlecode.com/svn/contrib/trunk/

Fredrik Johansson

unread,
Oct 21, 2008, 12:34:56 PM10/21/08
to sphin...@googlegroups.com

Yes, I was looking at the numpy documentation. Is it possible to
accomplish something similar with just autodoc?

Fredrik

Pierre GM

unread,
Oct 21, 2008, 12:52:33 PM10/21/08
to sphin...@googlegroups.com
> Yes, I was looking at the numpy documentation. Is it possible to
> accomplish something similar with just autodoc?

Nope, the numpy standard needs to be preprocessed to work with autodoc. Just
use the numpydoc extension and it'll do the job for you.


Reply all
Reply to author
Forward
0 new messages