vim-python-docstring
vim-python-docstring copied to clipboard
Update existing docstring
Why: Now, a new docstring is always created. On a change of some arguments, on function that already has some docstring, that docstring should only be updated – new args added, old ones removed.
methods and functions only (in this issue)
expected behaviour
1. before
def foo(a: str):
""" Some description
Args:
a (str): bar
Returns:
something
"""
return 0
2. making changes in function
Changes in function only. Docstring not manually changed.
def foo(a: str, b:int):
""" Some description
Args:
a (str): bar
Returns:
something
"""
yield 0
3. regenate docstring
def foo(a: str, b:int):
""" Some description
Args:
a (str): bar
b (int):
Yields:
"""
yield 0