1. Georg Brandl
  2. sphinx
  3. Pull requests

Pull requests

#142 Open
Repository
Deleted repository
Branch
stable (2889281f19bc)
Repository
sphinx
Branch
stable

Make autosummary work with module, class and instance attributes

Author
  1. Marcel Stimberg
Reviewers
Description

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)