Skip to content

Commit 21c34e6

Browse files
committed
update docs conf
1 parent 31a1f9e commit 21c34e6

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

docs/conf.py

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
"sphinx.ext.autodoc",
1818
"sphinxcontrib.jquery",
1919
"sphinx.ext.intersphinx",
20-
"sphinx.ext.viewcode",
20+
"sphinx.ext.napoleon",
21+
"sphinx.ext.todo",
2122
]
2223

24+
# TODO: Please Read!
2325
# Uncomment the below if you use native CircuitPython modules such as
2426
# digitalio, micropython and busio. List the modules you use. Without it, the
2527
# autodoc module docs will fail to generate with a warning.
@@ -34,6 +36,9 @@
3436
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
3537
}
3638

39+
# Show the docstring from both the class and its __init__() method.
40+
autoclass_content = "both"
41+
3742
# Add any paths that contain templates here, relative to this directory.
3843
templates_path = ["_templates"]
3944

@@ -71,7 +76,13 @@
7176
# List of patterns, relative to source directory, that match files and
7277
# directories to ignore when looking for source files.
7378
# This patterns also effect to html_static_path and html_extra_path
74-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
79+
exclude_patterns = [
80+
"_build",
81+
"Thumbs.db",
82+
".DS_Store",
83+
".env",
84+
"CODE_OF_CONDUCT.md",
85+
]
7586

7687
# The reST default role (used for this markup: `text`) to use for all
7788
# documents.
@@ -91,24 +102,16 @@
91102
# If this is True, todo emits a warning for each TODO entries. The default is False.
92103
todo_emit_warnings = True
93104

105+
napoleon_numpy_docstring = False
94106

95107
# -- Options for HTML output ----------------------------------------------
96108

97109
# The theme to use for HTML and HTML Help pages. See the documentation for
98110
# a list of builtin themes.
99111
#
100-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
112+
import sphinx_rtd_theme
101113

102-
if not on_rtd: # only import and set the theme if we're building docs locally
103-
try:
104-
import sphinx_rtd_theme
105-
106-
html_theme = "sphinx_rtd_theme"
107-
except ImportError:
108-
html_theme = "default"
109-
html_theme_path = ["."]
110-
else:
111-
html_theme_path = ["."]
114+
html_theme = "sphinx_rtd_theme"
112115

113116
# Add any paths that contain custom static files (such as style sheets) here,
114117
# relative to this directory. They are copied after the builtin static files,
@@ -128,16 +131,12 @@
128131

129132
latex_elements = {
130133
# The paper size ('letterpaper' or 'a4paper').
131-
#
132134
# 'papersize': 'letterpaper',
133135
# The font size ('10pt', '11pt' or '12pt').
134-
#
135136
# 'pointsize': '10pt',
136137
# Additional stuff for the LaTeX preamble.
137-
#
138138
# 'preamble': '',
139139
# Latex figure (float) alignment
140-
#
141140
# 'figure_align': 'htbp',
142141
}
143142

@@ -165,7 +164,7 @@
165164
"Adafruit FXOS8700 Library Documentation",
166165
[author],
167166
1,
168-
)
167+
),
169168
]
170169

171170
# -- Options for Texinfo output -------------------------------------------

0 commit comments

Comments
 (0)