-
Notifications
You must be signed in to change notification settings - Fork 4
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
Docstring updating #30
Comments
I understand your request, but I'm sorry, no. Diff is too complex. doq can't judge. Automerge is also too much complicated. |
I know, you are right. My idea was to keep existing as much as possible, in order to preserve human-generated contents, but just to add new placeholders in the middle if they are not matching the old names. It is not so much, and still it is complicated enough to make it unappealing. Maybe I will try in the future, and maybe not. Just in case: do you mind about pull requests? |
Thx for comment! I also wondering introduce diff into doq makes slow and maybe I can't maintain. if I want to implement diff system, maybe I implement outside of doq. def foo(arg1, arg2):
"""foo.
:param arg1:
:param arg2
"""
pass
You can get docstring JSON from doq and you can do whatever you want. So, sorry I can't accept introduce diff PR but extend doq output... let's discuss. |
Perfect, maybe you are right. I was interested mainly to use it inside vim-pydocstring, but if ever it will be implemented it does not hurt to keep it separate for a while, if it is really going to work it is always possible to merge it afterwards, or to make vim-pydocstring aware of it. |
Sometimes it happens that you need to update a docstring instead of generating a new one, since you already generated it in the past and you wrote your custom content, but now you add some argument, changed some default or any other stuffs like this.
Would be possible to make
doq
parsing the existing docstring and operate only on the diff?Example: I add only one argument, but everything else it's still the same, so when I run
doq
I would like to have everything untouched apart from one more argument inserted in the correct place among parameters, according to the template.MetaNote
I know that this feature request it's not minimal at all, but since it was an idea that came in my mind I thought to write it and let you decide if it is in the project scope or not.
The text was updated successfully, but these errors were encountered: