使用 Sphinx 扩展 NumpyDoc,是否有某种方法可以自动确保文档与其记录的代码匹配?
例如,由于拼写错误,以下文档与代码不匹配:
def myfunc(apples, bears):
"""
Parameters
----------
apples : int
The number of apples.
beards : int
The number of bears to eat the apples.
"""
Sphinx 或 NumpyDoc 可以使这成为错误吗?