sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

extend __all__ members to template rendering

Open ClementPinard opened this issue 3 years ago • 0 comments

Fixes #10809

  • the option autosummary_ignore_module_all when set to False adds members to module's members entry that will be used for autodoc, but otherwise it ignores it. As such, if a class is available in the __all__, it won't be generated.
  • This commit aims at extending the __all__ handling not only to members, but also to corresponding attribute types (functions, classes, exceptions, modules)
  • In short, the imported_members option is set to True if the object has __all__ member and autosummary is set to have autosummary_ignore_module_all set to False

See an example repo where the behaviour is changed : https://github.com/ClementPinard/sphinx_autosummary_bug_example

this PR is (at least initially) just for illustration and discussion purpose. tests where not checked

Feature or Bugfix

  • Feature
  • Bugfix

A mix of both

Detail

  • See issue #10809

ClementPinard avatar Sep 08 '22 21:09 ClementPinard