diff options
author | Eric Larson <larson.eric.d@gmail.com> | 2022-07-13 08:55:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 08:55:05 -0400 |
commit | d9c8d6766a20500015f53ffc12fb6b552014912b (patch) | |
tree | 1e535781814ec9f40b7f3bb4d14ab8a1f1755dbe /doc | |
parent | c796da669a9d3714126a3fde7221f9c47aef93c7 (diff) | |
download | numpydoc-d9c8d6766a20500015f53ffc12fb6b552014912b.tar.gz |
ENH: Add support for dict show_inherited_class_members (#415)
* ENH: Add support for dict show_inherited_class_members
* STY: Black
* TST: Add test
Diffstat (limited to 'doc')
-rw-r--r-- | doc/install.rst | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/install.rst b/doc/install.rst index fb3c26b..28b75a0 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -26,10 +26,18 @@ numpydoc_show_class_members : bool Whether to show all members of a class in the Methods and Attributes sections automatically. ``True`` by default. -numpydoc_show_inherited_class_members : bool +numpydoc_show_inherited_class_members : bool | dict Whether to show all inherited members of a class in the Methods and Attributes sections automatically. If it's false, inherited members won't shown. - ``True`` by default. + ``True`` by default. It can also be a dict mapping names of classes to + boolean values (missing keys are treated as ``True``). + For example, ``defaultdict(lambda: False, {'mymod.MyClass': True})`` + would only show inherited class members for ``MyClass``, whereas + ``{'mymod.MyClass': False}`` would show inherited class members for all + classes except ``MyClass``. Note that disabling this for a limited set of + classes might simultaneously require the use of a separate, custom + autosummary class template with ``:no-inherited-members:`` in the + ``autoclass`` directive options. numpydoc_class_members_toctree : bool Whether to create a Sphinx table of contents for the lists of class methods and attributes. If a table of contents is made, Sphinx expects |