refactor: autosummary: Remove unused parameter

This commit is contained in:
Takeshi KOMIYA 2020-04-21 23:38:00 +09:00
parent 6e28675727
commit b09978a5d6

View File

@ -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]