From b09978a5d67d65bcc22a4b29a97e5ad66799c196 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Tue, 21 Apr 2020 23:38:00 +0900 Subject: [PATCH] refactor: autosummary: Remove unused parameter --- sphinx/ext/autosummary/generate.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py index f5e65eb44..0449837ff 100644 --- a/sphinx/ext/autosummary/generate.py +++ b/sphinx/ext/autosummary/generate.py @@ -195,14 +195,12 @@ def generate_autosummary_content(name: str, obj: Any, parent: Any, public.append(name) return public, items - def get_modules(obj: Any, include_public: List[str] = []) -> Tuple[List[str], List[str]]: + def get_modules(obj: Any) -> Tuple[List[str], List[str]]: items = [] # type: List[str] for _, modname, ispkg in pkgutil.iter_modules(obj.__path__): fullname = name + '.' + modname items.append(fullname) - public = [x for x in items - if x in include_public or - not x.split('.')[-1].startswith('_')] + public = [x for x in items if not x.split('.')[-1].startswith('_')] return public, items ns = {} # type: Dict[str, Any]