Skip to content

Commit 2601b78

Browse files
dgarcia360avelanarius
authored andcommitted
docs: update conf.py
docs: test docs: add skip warnings option
1 parent 0d1f1c4 commit 2601b78

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

docs/source/conf.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
from datetime import date
55
import re
6-
import warnings
76
from docutils import nodes
87
from recommonmark.transform import AutoStructify
98
from recommonmark.parser import CommonMarkParser, splitext, urlparse
@@ -116,6 +115,7 @@
116115
'versions_unstable': UNSTABLE_VERSIONS,
117116
'versions_deprecated': DEPRECATED_VERSIONS,
118117
'hide_version_dropdown': ['scylla-3.x'],
118+
'skip_warnings': 'document_has_underscores'
119119
}
120120

121121
# If not None, a 'Last updated on:' timestamp is inserted at every page
@@ -171,12 +171,6 @@ def replace_relative_links(app, docname, source):
171171
source[0] = result
172172

173173

174-
def build_inited(app):
175-
warnings.filterwarnings(
176-
action="ignore",
177-
message=r".*Document name contains underscores:.*",
178-
)
179-
180174
def build_finished(app, exception):
181175
version_name = os.getenv("SPHINX_MULTIVERSION_NAME", "")
182176
version_name = "/" + version_name if version_name else ""
@@ -185,9 +179,6 @@ def build_finished(app, exception):
185179
redirects_cli.create(redirect_to=redirect_to,out_file=out_file)
186180

187181
def setup(app):
188-
# Filter warnings
189-
app.connect('builder-inited', build_inited)
190-
191182
# Setup Markdown parser
192183
app.add_source_parser(CustomCommonMarkParser)
193184
app.add_config_value('recommonmark_config', {
@@ -207,4 +198,4 @@ def setup(app):
207198

208199
# Create redirect to JavaDoc API
209200
app.connect('build-finished', build_finished)
210-
201+

0 commit comments

Comments
 (0)