Pull requests

#142 Open
mstimberg mstimberg
birkenfeld birkenfeld

Make autosummary work with module, class and instance attributes

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 6affb32647b1
hg pull -r stable https://bitbucket.org/mstimberg/sphinx
# Note: This will create a new head!
hg merge 2889281f19bc
hg commit -m 'Merged in mstimberg/sphinx/stable (pull request #142)'
  1. Marcel Stimberg

This pull request should enable the use of autosummary directives for attributes that don't have a __doc__ attribute but a special comment (or a trailing docstring) as introduced by autodoc.

(At least) two things are maybe debatable:

  • I'm not quite sure why the autosummary extension has the imports from sphinx.ext.autodoc in the get_documenter function instead of at the top of the file. I left it this way but my change needs another symbol (the INSTANCEATTR singleton) from autodoc, I added this import to the top of the file.
  • I did not add any tests because I frankly do not now how this can be tested in a simple manner -- the autosummary extension did not contain any tests I could build upon...

This pull request should close issue #344, the example in that issue works as expected.

Comments (1)