From f196a92055df2ef7603ad777abfaa2989d4b6744 Mon Sep 17 00:00:00 2001 From: Lewis Haley Date: Fri, 17 Aug 2018 16:02:11 +0100 Subject: autodoc: add 'exclude-members' to user global options As the previous commit explains, it is now possible to specify arguments to the global options in config files. This means that we can now include the `exclude-members` option in this global configuration. Previously, there was no point including this option because it makes no sense without arguments. Including this option means users have the flexibility of explicitly including which special methods they want using (e.g.): :special-members: __init__, __iter__ or explicitly excluding which special-members (or other members) they want using (e.g.): :exclude-members: __weakref__, __hash__ --- sphinx/ext/autodoc/directive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sphinx/ext/autodoc/directive.py') diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py index aabf6b47d..34f7567d4 100644 --- a/sphinx/ext/autodoc/directive.py +++ b/sphinx/ext/autodoc/directive.py @@ -31,7 +31,7 @@ logger = logging.getLogger(__name__) # common option names for autodoc directives AUTODOC_DEFAULT_OPTIONS = ['members', 'undoc-members', 'inherited-members', 'show-inheritance', 'private-members', 'special-members', - 'ignore-module-all'] + 'ignore-module-all', 'exclude-members'] class DummyOptionSpec(object): -- cgit v1.2.1