-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 17.10.2010 20:14, schrieb Nikolaus Rath: > Nikolaus Rath <nikol...@rath.org> writes: > [ Problems with autodoc ] > > I did a bit more testing, and it seems that there really are some issues > with the automodule directive. > > Consider the attached small sample module bla.py. > > > > > If we add it to PYTHONPART and run sphinx with the an index.rst > file that just contains: > > .. automodule:: bla > :members: > > then everything works as expected. However, if we change to > > .. automethod:: bla.mymethod > > then we get the following error: > > index.rst:1: (WARNING/2) don't know which module to import for > autodocumenting u'bla.mymethod' (try placing a "module" or "currentmodule" > directive in the document, or giving an explicit module name) > > yet if we follow the suggestion and try > > .. currentmodule:: bla > .. automethod:: bla.mymethod > > things do not get any better: > > index.rst:2: (WARNING/2) autodoc can't import/find method 'bla.bla.mymethod', > it reported error: "bla", please check your spelling and sys.path > > And even the last alternative, > > .. currentmodule:: bla > .. automethod:: mymethod > > fails miserably: > > index.rst:2: (WARNING/2) don't know which module to import for > autodocumenting u'mymethod' (try placing a "module" or "currentmodule" > directive in the document, or giving an explicit module name) > > > > Is this a bug in automethod or am I just totally failing to understand > the way to use it?
I wouldn't talk about total failure, but the auto*method* directive needs a class name. What you want is auto*function*. cheers, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky7P2QACgkQN9GcIYhpnLD89ACfSh38hXprGuFKc0j40MYnV92R XnkAoJnZhfTPKSlHfdEfWtNq1susLDJk =fK7h -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.