Get the App
SLTechnology News&Howtos  ›  Development  › 

How does pycharm insert documentation comments for functions

Shulou Source: shulou.com Published: 2022-06-01 18:38:25 10月04日 Update

This article mainly introduces pycharm how to insert documentation notes for the function, the article is very detailed, has a certain reference value, interested friends must read it!

Pycharm inserts documentation comments for the function

S1 cursor over the function name, click on the small light bulb, the menu appears

S2 Select input documentation string stub, that is, insert document comments

S3 input the parameter comments of the function and return the value comments

Simple settings for pycharm function comments

There may be situations where function automatic annotations cannot be used after installing PyCharm.

You can modify it in the following path: File- > Settings- > Tools- > Python Intrgrated Tools- > Docstrings- > Docstring format

After modification, enter three "enter" at the bottom of the function and the corresponding format comments will be automatically added.

'' @ Project: python@File: TEST@Author: threeegg@foxmail.com@Data: 2021-3-22 10:26'''def newfunc (10:26'''def newfunc b): "" Args: a: B: Returns: "" pass above is all the content of the article "how to insert documentation comments for a function by pycharm". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Comments functions documents content articles inputs three values cursors interests parameters guys partners situations more formats light bulbs knowledge menus industries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux Docker Microsoft macOS