'How to choose format of reST docstring stubs in PyCharm?
In JetBrain's example for docstring in Pycharm, it is mentioned that:
Note that for reStructuredText it's possible to specify types in two formats:
:param param_type param_name: parameter description (type description is on the same line as the parameter description).
:type param_name: param_type (type description is on a separate line)
I want to make my pycharm autogenerate the second variant, not the first one? Currently, it is even not even adding the type
def foo(a: str, b: int = 1) -> str:
"""
:param a:
:param b:
:return:
"""
return a + str(b)
a related question is: How to customize docstring generation in pycharm and share the template through git?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
