Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10058: Autosummary excludes stuff from its table if autodoc_class_signature='separated'. #10060

Closed
wants to merge 2 commits into from

Conversation

akdor1154
Copy link

Subject: Fix #10058: Autosummary excludes stuff from its table if autodoc_class_signature='separated'.

Feature or Bugfix

  • Bugfix

Purpose

When using autosummary with autodoc_class_signature = 'separated', it won't include any Classes in its summary table, even if you explicitly ask for them.

This seems to be because when this method is set, the ClassDocumenter gets its options.members set to ['__new__', '__init__']; it seems to be always None/[] in other cases. So I think the check_module() check (ext/autosummary/__init__.py:376) has never really been working properly, but it hasn't mattered because options.members is normally falsy in most situations.

The included test shows the broken behaviour pretty clearly, the fix commit seems to make sense to me but I'm not familiar with Sphinx source code, maybe there's a better fix.

Jarrad Whitaker added 2 commits January 7, 2022 22:28
Pass the `autosummary_imported_members` config var into
Documenter.options.imported_members, so we don't miss
members from autosummary tables.
@tk0miya
Copy link
Member

tk0miya commented Jan 10, 2022

Is this related to autodoc_class_signature?

@tk0miya
Copy link
Member

tk0miya commented Jan 10, 2022

Is this related to autodoc_class_signature?

Ah, sorry. Now I understand this bug. It is consist of two bugs. One is an imported object is shown even if autosummary_imported_members = False. Another is an imported object is not shown when autodoc_class_signature is enabled even if autosummary_imported_members = True.

I'll start to review this again from now on.

@tk0miya
Copy link
Member

tk0miya commented Jan 10, 2022

Note:

@tk0miya
Copy link
Member

tk0miya commented Jan 11, 2022

Merged #10085 instead. Thank you for your contribution!

@tk0miya tk0miya closed this Jan 11, 2022
@akdor1154
Copy link
Author

thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

autosummary - autosummary_imported_members doesn't apply to items in table
2 participants