Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Contributors
* KINEBUCHI Tomohiko -- typing Sphinx as well as docutils
* Kurt McKee -- documentation updates
* Lars Hupfeldt Nielsen - OpenSSL FIPS mode md5 bug fix
* Lisandro Dalcin - autodoc/autosummary improvements
* Louis Maddox -- better docstrings
* Łukasz Langa -- partial support for autodoc
* Marco Buttu -- doctest extension (pyversion option)
Expand Down
6 changes: 3 additions & 3 deletions sphinx/ext/autosummary/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def generate_autosummary_content(
)
ns['modules'] = imported_modules + modules
ns['all_modules'] = all_imported_modules + all_modules
elif obj_type == 'class':
elif obj_type in {'class', 'exception'}:
ns['members'] = dir(obj)
ns['inherited_members'] = set(dir(obj)) - set(obj.__dict__.keys())
ns['methods'], ns['all_methods'] = _get_members(
Expand All @@ -393,7 +393,7 @@ def generate_autosummary_content(
if obj_type in {'method', 'attribute', 'property'}:
ns['class'] = qualname.rsplit('.', 1)[0]

if obj_type == 'class':
if obj_type in {'class', 'exception'}:
shortname = qualname
else:
shortname = qualname.rsplit('.', 1)[-1]
Expand Down Expand Up @@ -520,7 +520,7 @@ def _get_all_members(
) -> dict[str, Any]:
if obj_type == 'module':
return _get_module_members(obj, config=config)
elif obj_type == 'class':
elif obj_type in {'class', 'exception'}:
return _get_class_members(obj)
return {}

Expand Down
Loading