def f(int_or_float):
    """
    :type int_or_float: Union[int, float]
    :rtype: float
    """
return int_or_float + 1.0
How to express multiple types for a single parameter or a return value in docstrings that are processed by Sphinx?