PyCharm
 
Get PyCharm

Legacy type syntax for docstrings

Last modified: 31 October 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: