Kevin Dangoor schrieb: > I took a look at the latest autodoc source and started working from > Sphinx trunk. I thought it might be a simple matter of subclassing the > FunctionDocumenter. Here is what I tried in my conf.py: > > class TaskDocumenter(autodoc.FunctionDocumenter): > objtype = "task" > directivetype = "autofunction" > > @classmethod > def can_document_member(cls, member, membername, isattr, parent): > print "I'm checking ", membername, isinstance(member, Task) > return isinstance(member, Task) > > autodoc.add_documenter(TaskDocumenter) > > >>From the print statement, I can see it check things out and find the > Task objects. But, it doesn't work... it hits this exception:
I think the problem is the ``directivetype = "autofunction"``. The directivetype attribute gives the name of the *generated* directive, so that would just be "function", like for the FunctionDocumenter. Like this, the "autofunction" directive gets a "module" option which it doesn't know about. cheers, Georg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
