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

Legacy type syntax for docstrings

Last modified: 11 February 2024

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 dialog.

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