mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refactor: autosummary: Remove unused parameter
This commit is contained in:
parent
6e28675727
commit
b09978a5d6
@ -195,14 +195,12 @@ def generate_autosummary_content(name: str, obj: Any, parent: Any,
|
|||||||
public.append(name)
|
public.append(name)
|
||||||
return public, items
|
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]
|
items = [] # type: List[str]
|
||||||
for _, modname, ispkg in pkgutil.iter_modules(obj.__path__):
|
for _, modname, ispkg in pkgutil.iter_modules(obj.__path__):
|
||||||
fullname = name + '.' + modname
|
fullname = name + '.' + modname
|
||||||
items.append(fullname)
|
items.append(fullname)
|
||||||
public = [x for x in items
|
public = [x for x in items if not x.split('.')[-1].startswith('_')]
|
||||||
if x in include_public or
|
|
||||||
not x.split('.')[-1].startswith('_')]
|
|
||||||
return public, items
|
return public, items
|
||||||
|
|
||||||
ns = {} # type: Dict[str, Any]
|
ns = {} # type: Dict[str, Any]
|
||||||
|
Loading…
Reference in New Issue
Block a user