From d9c8d6766a20500015f53ffc12fb6b552014912b Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 13 Jul 2022 08:55:05 -0400 Subject: ENH: Add support for dict show_inherited_class_members (#415) * ENH: Add support for dict show_inherited_class_members * STY: Black * TST: Add test --- doc/install.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'doc') 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 -- cgit v1.2.1