Skip to content

How to change the display of functions from "Methods" to "Functions"? #208

Closed Answered by pawamoy
yasuhito asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @yasuhito. "Methods" is used for functions inside classes. Functions and methods are basically the same thing, we just call those "methods" when they're, well, methods. If you'd prefer using a "func" label for both, see https://mkdocstrings.github.io/python/usage/customization/#symbol-types. For auto-generated summary tables, you'll have to override the relevant template (docstring/functions.html.jinja) to replace occurrences of "Methods" with "Functions". For manually written summaries, use a "Functions" docstring section instead of a "Methods" one (see https://mkdocstrings.github.io/griffe/reference/docstrings/#google-section-functions).

Let me know if that helps!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by yasuhito
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants