autoDocstring icon indicating copy to clipboard operation
autoDocstring copied to clipboard

Update docstring

Open Bloodmallet opened this issue 6 years ago • 19 comments

Hey, I was wondering whether there was already a way to auto-update docstrings.

def start(a):
  """[summary]
  
  Arguments:
    a {[type]} -- [description]
  """
  pass

to auto update to:

def changed(a,b):
  """[summary]
  
  Arguments:
    a {[type]} -- [description]
    b {[type]} -- [description]
  """
  pass

keeping the values of the already existing data lines.

And if some argument disappears, keep track of it in "Deleted" for example:

def deleted(b):
  """[summary]
  
  Arguments:
    b {[type]} -- [description]

  Deleted:
    a {[type]} -- [description]
  """
  pass

Bloodmallet avatar Feb 21 '18 14:02 Bloodmallet

Hi Bloodmallet, Thanks for the suggestion. I will take a look at what would be required to implement this feature. At first glance, I think this may be a little difficult as I'd have to build a whole separate parser for docstrings. But it also looks like a fun challenge so I'll give it a go when I have some time.

NilsJPWerner avatar Feb 28 '18 07:02 NilsJPWerner

Thank you for considering it!

Bloodmallet avatar Feb 28 '18 08:02 Bloodmallet

+1 for this feature. I implemented this for SublimeAutoDocstring and can say update functionality is a little tricky to do correctly, but it's a super handy feature. I would love to help if you have any questions. Unfortunately, my javascript is rusty and I haven't touched TypeScript, so you probably don't want me touching your code.

KristoforMaynard avatar Mar 04 '18 19:03 KristoforMaynard

@KristoforMaynard Oh awesome! I'll take a look at your code and maybe ask you if I have any questions.

NilsJPWerner avatar Mar 05 '18 04:03 NilsJPWerner

Any update on this front? Any idea on when this feature will be available?

kanihal avatar Nov 10 '18 07:11 kanihal

Aaah, how I miss this from SublimeText. @KristoforMaynard, your work was really appreciated! I came here hoping I might be able to contribute, but my JS experience is about zero, and I barely know TS is a thing. :(

So, just saying that this feature would push this extension way over the top, into indispensable tier, if that helps motivate at all!

JonathanShor avatar Jul 18 '19 01:07 JonathanShor

Hi thanks for the praise. I haven't begun building this feature yet, but the new templating backend could make this an easier thing to implement.

NilsJPWerner avatar Jul 18 '19 01:07 NilsJPWerner

Any update on this feature? Currently, I'm using sublime-text only to update and instantiate my doc strings. Would make your awesome extension 10 times more valuable to the community! Keep up the good work.

schlowm0 avatar Jan 20 '20 00:01 schlowm0

This is going to a super useful feature. Was searching on how to do it with this extension till I reached here. Can be tricky but shouldn't be too hard. Looking forward to it.

fahdbaig avatar Feb 21 '20 16:02 fahdbaig

That feature would indeed be super valuable. Unfortunately, I don't have any JS experience either.

ChristianZimpelmann avatar Nov 19 '20 15:11 ChristianZimpelmann

I suppose there are only Python guys here. I wonder how we could motivate a JS/Typescript guy to tackle this incredibly-super-useful issue...

farjasju avatar Jan 28 '21 17:01 farjasju

I’m slowly working away at this feature and hope to have a beta out soon.

NilsJPWerner avatar Feb 02 '21 02:02 NilsJPWerner

cannot wait for this feature!!!

shelper avatar Aug 09 '21 13:08 shelper

Any updates on this? Super excited.

84danie avatar Dec 08 '21 21:12 84danie

+1 for this feature. Thanks for an amazing plugin!!

hidara2000 avatar Feb 15 '22 23:02 hidara2000

+1 This would be indeed very helpful. Please make it happen. Thank you for this really amazing plugin. Love it.

czwilling avatar May 23 '22 14:05 czwilling

+1 this would be great to have, even if it's not 100% comprehensive.

irenepc avatar Jun 28 '22 17:06 irenepc

+1 this would be great to not have to repeat the generation every time the function definition is updated. Thanks for the amazing extension

Suprabat avatar Sep 26 '22 17:09 Suprabat

+1 This would be very nice to save time!

robinzyb avatar Nov 10 '22 02:11 robinzyb