Type hints support for the Sphinx autodoc extension
This extension allows you to use Python 3 annotations for documenting acceptable argument types and return value types of functions. This allows you to use type hints in a very natural fashion, allowing you to migrate from this: def format_unit(value, unit): “”” Formats the given value as a human readable string using the given units. :param float|int value: a numeric value :param str unit: the unit for the value (kg, m, etc.) :rtype: str “”” return ‘{} {}’.format(value, unit) to […]
Read more