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

Update docstring #45

Open
asetGem opened this issue May 20, 2019 · 0 comments
Open

Update docstring #45

asetGem opened this issue May 20, 2019 · 0 comments

Comments

@asetGem
Copy link

asetGem commented May 20, 2019

When the first version of a function takes some parameters, it generates the right docstring, that we just have to complete.
However, if we change the function by adding/removing parameter(s), and adding/removing a return, the docstring is not automatically updated.
The only solutions I found are:

  • either complete by myself, following the format generated
    Problem: must know the format rules (which is supposed to be simplified by using docblockr_python). For example, if there was no return in the function when we first generated the docstring, and now there is one, we have to check the format to know how to add our return value with its type and description.
  • or re-generate docstring, and then copy all descriptions/types of all parameters I already filled before
    Problem: time consuming... We are kind of writing the docstring twice...

It would be great if we could update the current docstring.

For now, hitting 'tab' after the starting """ generates a docstring.

What would be great:

  • When hitting 'tab', when there is already a docstring, generate an updated version of it (or do not change if nothing changed in function parameters/return of course...)
  • If a parameter is already in the docstring, then do nothing.
  • Otherwise, add it with default "description"/"type".

Do you think this could be possible?

Thanks

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

No branches or pull requests

1 participant