autoDocstring
autoDocstring copied to clipboard
"Returns" section of google docstrings resembles numpy style
Describe the bug
The current template for google docstring's Returns section is as follows:
Returns:
_type_: _description_
The Google Python Style Guide suggests a sentence like A dict mapping keys to the corresponding table row data fetched. instead of these type os structures.
Worse still, in case the return value is a tuple, the current template suggests _type_: _description_ blocks should be added to describe each value, in the same way numpy style does. But the numpy pattern is explicitly forbidden by the style guide.
The template should be more google-esque or, at least, less numpy-esque.
Versions (please complete the following information):
- autoDocstring Version: 0.6.1
- Operating System: Windows 10
- Vscode Version: 1.66.0
Original Code (with line to generate on):
def foo():
# generate on this line
return 1, "two"
Expected Result:
def foo():
"""_summary_
Returns:
_description_
"""
return 1, "two"
or
def foo():
"""_summary_
Returns:
A _type_
"""
return 1, "two"
Actual Result:
def foo():
"""_summary_
Returns:
_type_: _description_
"""
return 1, "two"