mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[autosummary] forgot to adapt types
This commit is contained in:
parent
ec8656bd27
commit
063f2d066b
@ -225,7 +225,7 @@ def generate_autosummary_docs(sources, # type: List[str]
|
|||||||
return public, items
|
return public, items
|
||||||
|
|
||||||
def get_modules(obj, include_public=[]):
|
def get_modules(obj, include_public=[]):
|
||||||
# type: (Any, str, List[str]) -> Tuple[List[str], List[str]]
|
# type: (Any, List[str]) -> 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
|
||||||
@ -250,8 +250,7 @@ def generate_autosummary_docs(sources, # type: List[str]
|
|||||||
ns['exceptions'], ns['all_exceptions'] = \
|
ns['exceptions'], ns['all_exceptions'] = \
|
||||||
get_members(obj, {'exception'}, imported=imported_members)
|
get_members(obj, {'exception'}, imported=imported_members)
|
||||||
if ispackage and recursive:
|
if ispackage and recursive:
|
||||||
ns['modules'], ns['all_modules'] = \
|
ns['modules'], ns['all_modules'] = get_modules(obj)
|
||||||
get_modules(obj)
|
|
||||||
elif doc.objtype == 'class':
|
elif doc.objtype == 'class':
|
||||||
ns['members'] = dir(obj)
|
ns['members'] = dir(obj)
|
||||||
ns['inherited_members'] = \
|
ns['inherited_members'] = \
|
||||||
|
Loading…
Reference in New Issue
Block a user