/docstring
Description
Automatically generate or improve docstrings for your code, enhancing documentation quality and maintainability. The /docstring
command is designed to aid in creating comprehensive, clear, and consistent docstrings for functions, classes, and modules, following best documentation practices.
How to Use
To use the /docstring
command, follow these steps:
-
Select Your Mode: Choose the appropriate context for adding or improving docstrings. Qodo Gen supports this command in two modes:
- Current File Focus: For generating or refining docstrings within a specific file, focusing on individual functions, classes, or entire files.
- Git-Diff Focus: For a broader approach, encompassing multiple files within your changeset to ensure consistent documentation across your project.
-
Select Your Focus: Identify the code segment or entire file for which you wish to generate or enhance the docstring.
-
Initiate the Command: Type
/docstring
followed by an optional specific instruction or leave it blank for general docstring generation. Qodo Gen will analyze the selected code and generate a suitable docstring or suggest improvements to existing documentation. -
Review and Apply: Evaluate the suggested docstring provided by Qodo Gen. You can directly apply the changes with a single click or edit the suggestion to better fit your requirements before applying.
Available in