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

Generate python class and module scope docstrings #657

Closed
tekulvw opened this issue Apr 18, 2024 · 3 comments · Fixed by #660
Closed

Generate python class and module scope docstrings #657

tekulvw opened this issue Apr 18, 2024 · 3 comments · Fixed by #660

Comments

@tekulvw
Copy link

tekulvw commented Apr 18, 2024

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Class scope documentation serves to provide a description of what the class is and details on any class level parameters:

class Foo:
    """
    Foo is a Thing that does Other Thing.
    :param baz: 
    """
    baz: int

Module scope documentation:

"""
Foo serves to [...]
"""
import time

...

Describe alternatives you've considered

Additional context

@btalb
Copy link

btalb commented Apr 30, 2024

+1.

Tracing to https://github.com/kkoomen/vim-doge/blob/master/helper/src/python/parser.rs and the associated tests it looks like only recognising functions is implemented.

It would be nice in the README to document what tags are supported for each language.

@kkoomen
Copy link
Owner

kkoomen commented May 1, 2024

I've implement the PR #660 based on https://stackoverflow.com/a/3051356 with solely the addition of classes. I'm not supporting the import docstring because it's super rare to see that. It's quite common to add class docs, hence I support that. I'll do a new release soon and will notify it here.

@kkoomen
Copy link
Owner

kkoomen commented May 1, 2024

This feature has been merged and released in v4.7.0.

Feel free to submit any new issues if you experience any unwanted behavior in the future. Thanks for your contribution.

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

Successfully merging a pull request may close this issue.

3 participants