7

I am using VS Code as my editor and autoDocstring as the auto-docstring generator extension for Python. There are times when I modify the parameters of a function, either by introducing new parameters or by modifying their names, default values etc. I am required to make manual changes to the docstring in such cases.

Is there any way that the docstring gets auto-updated as I change the function signature? At least the introduction of new parameters to the docstring section.

Anirban Chakraborty
  • 539
  • 1
  • 5
  • 15
  • why not create a PR for the extension, implement the behavior you want – rioV8 Apr 30 '22 at 07:57
  • 1
    If you use the IDE's builtin refactor it should inspect docstrings and comments and offer to update them. – bad_coder Apr 30 '22 at 18:46
  • @bad_coder - I am using VS Code. I tried the refactor facility in there but nothing happened. Could you please provide an example with maybe a few screenshots? Any editor in which you might have found the result will do. – Anirban Chakraborty May 08 '22 at 05:58
  • 1
    @AnirbanChakraborty PyCharm will catch the names, but won't refactor the types, or descriptions automatically. – bad_coder May 08 '22 at 09:46

0 Answers0