Skip to content

Commit 8316fd3

Browse files
committed
Sphinx config
1 parent b4cd85a commit 8316fd3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/conf.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# All configuration values have a default; values that are commented out
1111
# serve to show the default.
1212

13+
import datetime
1314
import os
1415
import sys
1516

@@ -30,19 +31,23 @@
3031
"nbsphinx",
3132
"sphinx_gallery.load_style",
3233
"sphinx.ext.autodoc",
33-
"sphinx_autodoc_typehints",
34-
"sphinx.ext.doctest",
3534
"sphinx.ext.viewcode",
3635
"sphinx.ext.autosectionlabel",
36+
"sphinx.ext.napoleon",
3737
]
3838

39+
# Napoleon settings. We only accept Google-style docstrings.
40+
napoleon_google_docstring = True
41+
napoleon_numpy_docstring = False
42+
3943
# AutosectionLabel settings.
4044
# Uses a <page>:<label> schema which doesn't work for duplicate sub-section
4145
# labels, so set max depth.
4246
autosectionlabel_prefix_document = True
4347
autosectionlabel_maxdepth = 2
4448

4549
# AutodocTypehints settings.
50+
autodoc_typehints = 'description'
4651
always_document_param_types = True
4752
typehints_defaults = "comma"
4853

@@ -60,7 +65,8 @@
6065

6166
# General information about the project.
6267
project = "redis-py"
63-
copyright = "2023, Redis Inc"
68+
current_year = datetime.datetime.now().year
69+
copyright = f"{current_year}, Redis Inc"
6470

6571
# The version info for the project you're documenting, acts as replacement for
6672
# |version| and |release|, also used in various other places throughout the

0 commit comments

Comments
 (0)