4

I have installed the Visual Studio Code extension Python Docstring Generator that autogenerates docstring snippet.

Customized settings that I use:

"autoDocstring.docstringFormat": "sphinx",
"autoDocstring.generateDocstringOnEnter": true,
"autoDocstring.includeExtendedSummary": true,
"autoDocstring.guessTypes": true,
"autoDocstring.customTemplatePath": ".vscode/sphinx.mustache",

However, it is mostly useful for function's docstring.

How can I also generate:

  • docstring for modules and scripts: entered in the beginning of the module
  • packages: Added to the __init__.py file
  • classes

Any idea in this regard?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Amin Ba
  • 1,603
  • 1
  • 13
  • 38
  • It doesn't do that: "Visual Studio Code extension to quickly generate docstrings for python **functions**." – mkrieger1 Jan 22 '22 at 21:16
  • 4
    There's nothing to generate for classes and modules, just type the docstring text, surrounded by `"""`. Or what exactly did you expect it to generate? – mkrieger1 Jan 22 '22 at 21:17

0 Answers0