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

Instance attributes are omitted with autosummary #8011

Closed
Chilipp opened this issue Jul 27, 2020 · 3 comments
Closed

Instance attributes are omitted with autosummary #8011

Chilipp opened this issue Jul 27, 2020 · 3 comments
Labels
extensions:autosummary type:enhancement enhance or introduce a new feature
Milestone

Comments

@Chilipp
Copy link

Chilipp commented Jul 27, 2020

This issue is a followup of #7948. Sorry, I forgot to open it.

Is your feature request related to a problem? Please describe.
Instance attributes are omitted when using the autosummary, as they cannot be imported. Consider the following class

# contents of test_mod.py

class Test:
    """Test class"""

    #: int. Some class attribute
    test: int = 1

    def __init__(self, a: int):
        #: int. An instance attribute
        self.a = 1

autodoc via

.. autoclass:: Test
    :members:

will document the a attribute, but autosummary via

.. autosummary::

    Test.a
    Test.test

won't.

Describe the solution you'd like
Instance attributes should be documented, too

Describe alternatives you've considered
it did work before 1dcfc44, i.e. for sphinx<3.1 (although the documentation was omitted).

Additional context

@Chilipp Chilipp added the type:enhancement enhance or introduce a new feature label Jul 27, 2020
@Chilipp
Copy link
Author

Chilipp commented Jul 27, 2020

@tk0miya, I cannot add labels or milestones here, but nonetheless already closed #7948

@tk0miya tk0miya added this to the 3.2.0 milestone Jul 29, 2020
@tk0miya
Copy link
Member

tk0miya commented Jul 29, 2020

Okay, I'll try to fix this if I have time until the next release.

@tk0miya tk0miya closed this as completed in 92e863f Aug 2, 2020
tk0miya added a commit that referenced this issue Aug 2, 2020
Close #8011: autosummary: Support instance attributes
@Chilipp
Copy link
Author

Chilipp commented Aug 2, 2020

Absolutely great! Thanks a lot @tk0miya!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions:autosummary type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants