Skip to content

Easily extendable autodoc #3

@shimizukawa

Description

@shimizukawa

Make autodoc directives easily extendable, as proposed in

http://groups.google.com/group/sphinx-dev/browse_thread/thread/7845240128b3b48a/5d7bc99598699710?lnk=gst&q=autodoc#5d7bc99598699710

[comment from OP]

I'd like to retract my proposition, or rather rephrase it.

Extending autodoc would be simpler if directives such as function, class, method were
defined as classes rather than in the desc_directive function.

Something like:

class Description(Directive):

   def __init__
   def handle_options
   def handle_signature
   def handle_content
   def handle_field_list
   def index_as
   def run

Extending autodoc would then simply be a matter of subclassing those directive. I
used this approach to write directives to autodocument fortran code (fortrandoc on
launchpad) and I found it worked well.


Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions