@@ -68,7 +68,7 @@ def __init__(self, translator: NullTranslations) -> None:
6868
6969 self .config .add ('autosummary_context' , {}, True , None )
7070 self .config .add ('autosummary_filename_map' , {}, True , None )
71- self .config .add ('autosummary_ignore___all__ ' , True , 'env' , bool )
71+ self .config .add ('autosummary_ignore_module_all ' , True , 'env' , bool )
7272 self .config .init_values ()
7373
7474 def emit_firstresult (self , * args : Any ) -> None :
@@ -219,7 +219,7 @@ def scan(self, imported_members: bool) -> List[str]:
219219 elif imported is False :
220220 # list not-imported members
221221 members .append (name )
222- elif '__all__' in dir (self .object ) and not self .app .config .autosummary_ignore___all__ :
222+ elif '__all__' in dir (self .object ) and not self .app .config .autosummary_ignore_module_all :
223223 # list members that have __all__ set
224224 members .append (name )
225225
@@ -228,9 +228,9 @@ def scan(self, imported_members: bool) -> List[str]:
228228def members_of (conf : Config , obj : Any ) -> Sequence [str ]:
229229 """Get the members of ``obj``, possibly ignoring the ``__all__`` module attribute
230230
231- Follows the ``conf.autosummary_ignore___all__ `` setting."""
231+ Follows the ``conf.autosummary_ignore_module_all `` setting."""
232232
233- if conf .autosummary_ignore___all__ :
233+ if conf .autosummary_ignore_module_all :
234234 return dir (obj )
235235 else :
236236 return getall (obj ) or dir (obj )
@@ -645,8 +645,8 @@ def get_parser() -> argparse.ArgumentParser:
645645 dest = 'imported_members' , default = False ,
646646 help = __ ('document imported members (default: '
647647 '%(default)s)' ))
648- parser .add_argument ('-a' , '--respect-module-all' , action = 'store_false ' ,
649- dest = 'ignore___all__ ' , default = True ,
648+ parser .add_argument ('-a' , '--respect-module-all' , action = 'store_true ' ,
649+ dest = 'respect_module_all ' , default = False ,
650650 help = __ ('document exactly the members in module __all__ attribute. '
651651 '(default: %(default)s)' ))
652652
@@ -665,7 +665,7 @@ def main(argv: List[str] = sys.argv[1:]) -> None:
665665
666666 if args .templates :
667667 app .config .templates_path .append (path .abspath (args .templates ))
668- app .config .autosummary_ignore___all__ = args .ignore___all__
668+ app .config .autosummary_ignore_module_all = not args .respect_module_all
669669
670670 generate_autosummary_docs (args .source_file , args .output_dir ,
671671 '.' + args .suffix ,
0 commit comments