summaryrefslogtreecommitdiff
path: root/sphinx/ext
diff options
context:
space:
mode:
authorJosh Mitchell <yoshanuikabundi@gmail.com>2021-11-15 13:27:26 +1100
committerJosh Mitchell <yoshanuikabundi@gmail.com>2021-11-15 13:27:26 +1100
commit8e45229feed31786f90057dd97ff25f793841855 (patch)
tree224cb809742e59f94231283c7aa877e4c5beee6a /sphinx/ext
parent79089b5fa43e1bc3156cf4cc11b06e956bb9fa07 (diff)
downloadsphinx-git-8e45229feed31786f90057dd97ff25f793841855.tar.gz
Fixed missed ignore___all__ -> ignore_module_all
Diffstat (limited to 'sphinx/ext')
-rw-r--r--sphinx/ext/autosummary/__init__.py2
-rw-r--r--sphinx/ext/autosummary/generate.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py
index b8691b3da..298c90138 100644
--- a/sphinx/ext/autosummary/__init__.py
+++ b/sphinx/ext/autosummary/__init__.py
@@ -826,6 +826,6 @@ def setup(app: Sphinx) -> Dict[str, Any]:
app.add_config_value('autosummary_mock_imports',
lambda config: config.autodoc_mock_imports, 'env')
app.add_config_value('autosummary_imported_members', [], False, [bool])
- app.add_config_value('autosummary_ignore___all__', True, 'env', bool)
+ app.add_config_value('autosummary_ignore_module_all', True, 'env', bool)
return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py
index 05363f3c7..dd712d802 100644
--- a/sphinx/ext/autosummary/generate.py
+++ b/sphinx/ext/autosummary/generate.py
@@ -68,7 +68,7 @@ class DummyApplication:
self.config.add('autosummary_context', {}, True, None)
self.config.add('autosummary_filename_map', {}, True, None)
- self.config.add('autosummary_ignore___all__', True, 'env', bool)
+ self.config.add('autosummary_ignore_module_all', True, 'env', bool)
self.config.init_values()
def emit_firstresult(self, *args: Any) -> None:
@@ -219,7 +219,7 @@ class ModuleScanner:
elif imported is False:
# list not-imported members
members.append(name)
- elif '__all__' in dir(self.object) and not self.app.config.autosummary_ignore___all__:
+ elif '__all__' in dir(self.object) and not self.app.config.autosummary_ignore_module_all:
# list members that have __all__ set
members.append(name)
@@ -228,9 +228,9 @@ class ModuleScanner:
def members_of(conf: Config, obj: Any) -> Sequence[str]:
"""Get the members of ``obj``, possibly ignoring the ``__all__`` module attribute
- Follows the ``conf.autosummary_ignore___all__`` setting."""
+ Follows the ``conf.autosummary_ignore_module_all`` setting."""
- if conf.autosummary_ignore___all__:
+ if conf.autosummary_ignore_module_all:
return dir(obj)
else:
return getall(obj) or dir(obj)
@@ -645,8 +645,8 @@ The format of the autosummary directive is documented in the
dest='imported_members', default=False,
help=__('document imported members (default: '
'%(default)s)'))
- parser.add_argument('-a', '--respect-module-all', action='store_false',
- dest='ignore___all__', default=True,
+ parser.add_argument('-a', '--respect-module-all', action='store_true',
+ dest='respect_module_all', default=False,
help=__('document exactly the members in module __all__ attribute. '
'(default: %(default)s)'))
@@ -665,7 +665,7 @@ def main(argv: List[str] = sys.argv[1:]) -> None:
if args.templates:
app.config.templates_path.append(path.abspath(args.templates))
- app.config.autosummary_ignore___all__ = args.ignore___all__
+ app.config.autosummary_ignore_module_all = not args.respect_module_all
generate_autosummary_docs(args.source_file, args.output_dir,
'.' + args.suffix,