From 49385d944bab82e08e32682883a1c7fd10f37782 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Thu, 3 May 2018 18:43:52 +0900 Subject: [PATCH] Fix #4932: apidoc: some subpackages is ignored if sibling subpackage contains underscored module --- CHANGES | 2 ++ sphinx/ext/apidoc.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 2da6c384b..bbf036276 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,8 @@ Bugs fixed ---------- * #4924: html search: Upper characters problem in any other languages +* #4932: apidoc: some subpackage is ignored if sibling subpackage contains a + module starting with underscore Testing -------- diff --git a/sphinx/ext/apidoc.py b/sphinx/ext/apidoc.py index 921152ef1..a01439121 100644 --- a/sphinx/ext/apidoc.py +++ b/sphinx/ext/apidoc.py @@ -199,8 +199,8 @@ def shall_skip(module, opts, excludes=[]): # Yes, check if we have any non-excluded modules at all here all_skipped = True basemodule = path.dirname(module) - for module in glob.glob(path.join(basemodule, '*.py')): - if not is_excluded(path.join(basemodule, module), excludes): + for submodule in glob.glob(path.join(basemodule, '*.py')): + if not is_excluded(path.join(basemodule, submodule), excludes): # There's a non-excluded module here, we won't skip all_skipped = False if all_skipped: