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

Autosummary to include instance attributes #9146

Merged
merged 4 commits into from May 5, 2021
Merged

Autosummary to include instance attributes #9146

merged 4 commits into from May 5, 2021

Conversation

pbudzyns
Copy link
Contributor

Subject: Autosummary to include instance attributes

Feature or Bugfix

  • Feature

Detail

  • Make sphinx.ext.autosummary to use sphinx.ext.autodoc.get_class_members instead of dir(obj) to discover class members and find instance attributes

Relates

@tk0miya tk0miya added this to the 4.1.0 milestone May 2, 2021
@pbudzyns
Copy link
Contributor Author

pbudzyns commented May 2, 2021

I haven't noticed that because it was working for my project. For safety I changed it back to old method for modules.

Alternatively I think it would be possible to easily extract static method from autodoc.ModuleDocumenter.get_module_members

def get_module_members(self) -> Dict[str, ObjectMember]:

@tk0miya tk0miya merged commit 1f860cb into sphinx-doc:4.x May 5, 2021
@tk0miya
Copy link
Member

tk0miya commented May 5, 2021

Thank you for update. Merged!

tk0miya added a commit that referenced this pull request May 5, 2021
@pelson
Copy link

pelson commented May 5, 2021

Just checking that I think this now means that dataclasses are being correctly documented with autosummary?

This is quite a big deal IMO, and might be worth publicising a little more. (changelog entry d006c66)

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

Successfully merging this pull request may close these issues.

None yet

3 participants