函数的 Sphinx 自动摘要模板在哪里?

Where are Sphinx autosummary templates for functions?

我正在使用 Sphinx 扩展 autosummary 为项目构建文档。我想对 the default templates that the documentation alludes to. I was able to copy and modify the templates for base.rst, class.rst, and module.rst as they are located in the Sphinx folder 做一个非常小的改动。

但是,我找不到 function.rstattribute.rstmethod.rst 的模板。我在哪里可以找到这些模板?

请参阅 https://github.com/sphinx-doc/sphinx/issues/1879#issuecomment-618529636

中的评论

Indeed, Sphinx does not have function.rst. But it's not a problem. You can change the template for functions by putting function.rst in your template directory.

If you need an example of the file, please copy base.rst to your local and modify it. Sphinx uses it as a fallback if function.rst not found.