Skip to content

Easily extendable autodoc #3

Closed
Closed

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.


Activity

  1. added
    type:enhancement
    on Jan 2, 2015
  2. shimizukawa commented on Jan 2, 2015

    @shimizukawa
    MemberAuthor

    From Georg Brandl on 2009-01-04 20:03:59+00:00

    When we switch to docutils 0.5 only as a dependency is a good occasion to do this.

  3. shimizukawa commented on Jan 2, 2015

    @shimizukawa
    MemberAuthor

    From Georg Brandl on 2009-02-20 09:35:41+00:00

    Now implemented in trunk (even without requiring docutils 0.5).

  4. shimizukawa commented on Jan 2, 2015

    @shimizukawa
    MemberAuthor

    From Georg Brandl on 2010-08-25 12:19:56+00:00

    Removing milestone: 0.6 (automated comment)

  5. locked as resolved and limited conversation to collaborators on Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensions:autodoctype:enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions