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?

Sphinx 1.0.4.


Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C
'''
mytest.bla module docstring
'''


def mymethod(foo):
    '''The mymethod documentation'''
    pass


class myclass(object):
    '''
    **myclass**

    A really awesoe class with some members
    '''

    def __init__(self):
        '''This is the constructor'''
        pass

        

    
-- 
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.

Reply via email to