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

module level google style docstring #257

Open
sdugaro opened this issue Mar 15, 2023 · 0 comments
Open

module level google style docstring #257

sdugaro opened this issue Mar 15, 2023 · 0 comments
Labels

Comments

@sdugaro
Copy link

sdugaro commented Mar 15, 2023

Describe the bug

Ive used google style docstrings in PyCharm a lot (w/ sphinx.napoleon) and
this looked to be nicest out of the box equivalent I could find for that w/ VsCode.

When following the google style examples for module level autodoc, it prefers that them to start right at the top before any import statements. "Files should start with a docstring describing the contents and usage of the module"

I got two strange behaviors when using this exension to do that

  1. empty file: erroneously indented
    """_summary
    """

  2. existing file, (after docstringing in a simple no argument function and then going up to the top level). Also erroneously indented 4 space, which has to be tidied.
    """_summary

    Raises:
    ValueError: description
    ValueError: description
    ValueError: description
    ValueError: description
    Returns:
    _type: description
    """"

Versions (please complete the following information):

  • autoDocstring Version: 0.6.1
  • Operating System: Windows
  • Vscode Version: 1.76.1

Original Code (with line to generate on):

"""

Expected Result:

"""A one-line summary of the module or program, terminated by a period.

Leave one blank line.  The rest of this docstring should contain an
overall description of the module or program.  Optionally, it may also
contain a brief description of exported classes and functions and/or usage
examples.

Typical usage example:

  foo = ClassFoo()
  bar = foo.FunctionBar()
"""

Actual Result:

Debug log:
Set autoDocstring.logLevel to "Debug", recreate the bug, and then copy the debug logs from the autoDocstring output channel.


Stack trace:
If an error was reported by autoDocstring please copy the stack trace from the autoDocstring output channel.


Additional context
Add any other context about the problem here.

@sdugaro sdugaro added the bug label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant