summaryrefslogtreecommitdiff
path: root/doc/usage/extensions
diff options
context:
space:
mode:
authorLewis Haley <lewis.haley@youview.com>2018-08-17 16:02:11 +0100
committerLewis Haley <lewis.haley@youview.com>2018-08-17 16:02:11 +0100
commitf196a92055df2ef7603ad777abfaa2989d4b6744 (patch)
tree49c425c4222abcd6811858e0d61943471b203229 /doc/usage/extensions
parent6e1e35c98ac29397d4552caf72710ccf4bf98bea (diff)
downloadsphinx-git-f196a92055df2ef7603ad777abfaa2989d4b6744.tar.gz
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__
Diffstat (limited to 'doc/usage/extensions')
-rw-r--r--doc/usage/extensions/autodoc.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/usage/extensions/autodoc.rst b/doc/usage/extensions/autodoc.rst
index 285756149..2b2a5f3ac 100644
--- a/doc/usage/extensions/autodoc.rst
+++ b/doc/usage/extensions/autodoc.rst
@@ -341,7 +341,8 @@ There are also new config values that you can set:
This value is a list of autodoc directive flags that should be automatically
applied to all autodoc directives. The supported flags are ``'members'``,
``'undoc-members'``, ``'private-members'``, ``'special-members'``,
- ``'inherited-members'``, ``'show-inheritance'`` and ``'ignore-module-all'``.
+ ``'inherited-members'``, ``'show-inheritance'``, ``'ignore-module-all'``
+ and ``'exclude-members'``.
If you set one of these flags in this config value, you can use a negated
form, :samp:`'no-{flag}'`, in an autodoc directive, to disable it once.
@@ -361,6 +362,7 @@ There are also new config values that you can set:
'member-order': 'bysource',
'special-members': '__init__',
'undoc-members': None,
+ 'exclude-members': '__weakref__'
}
Setting ``None`` is equivalent to giving the option name in the list format