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

Numpydoc class attributes missing type in templating #197

Open
daara-s opened this issue Aug 27, 2024 · 0 comments
Open

Numpydoc class attributes missing type in templating #197

daara-s opened this issue Aug 27, 2024 · 0 comments

Comments

@daara-s
Copy link

daara-s commented Aug 27, 2024

The numpydoc style guide lists non-method class attributes with type and description, similar to function parameter docstrings.

eg

Attributes
----------
x : float
    Description of attribute `x`.
y : float
    Description of attribute `y`.

It looks like at the moment the numpydoc template only templates out type for function parameters.

When running :Neogen on the my dummy class I get the following docstring:

class DummyClass:
    """[TODO:description]

    Attributes
    ----------
    x : [TODO:attribute]
    y : [TODO:attribute]

    """
    x: int
    y: float

Ideally I'd like to see

"""
...
    Attributes
    ----------
    x : int
        [TODO:description]
    y : float
        [TODO:description]
...
"""

Should type be a part of class attribute docstrings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant