PyCharm
 
Get PyCharm
You are viewing the documentation for an earlier version of PyCharm.

Legacy type syntax for docstrings

Last modified: 01 October 2021

PyCharm supports legacy approach to specifying types in Python using docstrings. In doing so, the supported formats are:

To choose the desired docstring format, use the Python Integrated Tools page of the Settings/Preferences dialog.

Type syntax in Python docstrings is not defined by any standard. Thus, PyCharm suggests the following notation: