我正在按照numpydoc
样式指南记录我的代码,但我找不到返回类实例的约定:
"""Create an index in the meilisearch API.
If the argument \`uid\` isn't passed in, it will be generated by meilisearch.
If the argument \`name\` isn't passed in, it will raise an error.
Parameters
----------
name: str
Name of the index
uid: str, optional
Unique identifier of the index
Raises
------
HTTPError
If no name is passed in as a parameter.
HTTPError
In case of any other error found here https://docs.meilisearch.com/references/#errors-status-code
Returns
-------
index
an instance of Index containing the information of the newly created index
"""
如您所见,在返回部分中,我返回了一个 Index 实例。这是记录它的方式吗?
提前致谢