Merge pull request #7365 from tk0miya/7364_autosummary_crashed

Fix #7364: autosummary: crashed when autosummary_generate is False
This commit is contained in:
Takeshi KOMIYA 2020-03-25 01:42:57 +09:00 committed by GitHub
commit 955d02c983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,7 @@ Features added
Bugs fixed
----------
* #7364: autosummary: crashed when :confval:`autosummary_generate` is False
* #7370: autosummary: raises UnboundLocalError when unknown module given
Testing

View File

@ -722,6 +722,8 @@ def process_generate_options(app: Sphinx) -> None:
env = app.builder.env
genfiles = [env.doc2path(x, base=None) for x in env.found_docs
if os.path.isfile(env.doc2path(x))]
elif genfiles is False:
pass
else:
ext = list(app.config.source_suffix)
genfiles = [genfile + (ext[0] if not genfile.endswith(tuple(ext)) else '')