From 5b69ced1e8455352f081ff2d1f6df48923195f75 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 23 Jul 2019 18:53:53 +0200 Subject: [PATCH] Add ability to use Google style docstrings Use and configure the `napoleon` Sphinx extension --- docs/conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 40cd0c9..96ad6bb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,6 +41,7 @@ extensions = [ "sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx.ext.viewcode", + "sphinx.ext.napoleon", ] # Add any paths that contain templates here, relative to this directory. @@ -184,3 +185,13 @@ intersphinx_mapping = {"https://docs.python.org/": None} todo_include_todos = True todo_link_only = True + +# -- Options for napoleon extension ---------------------------------------------- + +# Use Google style docstrings +napoleon_google_docstring = True +napoleon_numpy_docstring = False + +# napoleon_use_admonition_for_examples = False +# napoleon_use_admonition_for_notes = False +# napoleon_use_admonition_for_references = False