Kevin Dangoor schrieb:
> On Mar 16, 8:22 pm, Kevin Dangoor <[email protected]> wrote:
>> That makes sense... and changing the directivetype to function
>> eliminates the error. Unfortunately, though, I'm not seeing any
>> generated content for the tasks...
> 
> For future reference, I was able to get Paver's Tasks documented as
> functions by overriding can_document_member and import_object.
> 
> class TaskDocumenter(autodoc.FunctionDocumenter):
>     objtype = "task"
>     directivetype = "function"
> 
>     @classmethod
>     def can_document_member(cls, member, membername, isattr, parent):
>         return isinstance(member, Task)
> 
>     def import_object(self):
>         super(TaskDocumenter, self).import_object()
>         obj = self.object
>         self.object = obj.func
>         return True

Hmm, perhaps the __doc__ of the original object wasn't available on
the Task?

Sorry for not getting back earlier,
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to