Reputation: 14801
Having a function like:
def foo(x: int) -> float:
return float(x)
I would like to use a NumPy-like docstring like the following:
def foo(x: int) -> float:
"""
Parameters
----------
x
Input parameter
Returns
-------
The output value.
"""
return float(x)
Note that:
Is there a Sphinx extension that supports that? Would you recommend another syntax?
Upvotes: 14
Views: 4893