Skip to main content

Autodoc

AutoDoc helps you automatically generate docstrings and comments for your code. It analyzes your code and suggests relevant comments.

There are two ways to access this feature:

1. You can access by clicking on quick action button top of functions in current coding file:

image-2025-5-6_11-16-32.png

2. Or else, you can access Autodoc by:

  • Select code snippets that you want to generate docstring. You can pass this step if you want to generate docstring for the whole coding file.

  • Right-click on the Coding file → Select Codevista → Select Generate comments as in the following figure.

Command list.png

  • View the generated docstrings/ comments 

image-2025-5-7_10-1-15.png

  • Select to Accept or Reject docstrings/ comments by clicking on quick action buttons:

image-2025-5-7_10-4-16.png

Note: The Autodoc feature supports a maximum input context of 16,000 tokens. If your file or project exceeds this limit, you may need to document sections individually or reduce the scope of the input.