autoDocstring icon indicating copy to clipboard operation
autoDocstring copied to clipboard

module level google style docstring

Open sdugaro opened this issue 2 years ago • 0 comments
trafficstars

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 avatar Mar 15 '23 23:03 sdugaro