Skip to content

Commit

Permalink
docs: update conf.py
Browse files Browse the repository at this point in the history
docs: test

docs: add skip warnings option
  • Loading branch information
dgarcia360 authored and avelanarius committed Dec 7, 2023
1 parent 0d1f1c4 commit 2601b78
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
from datetime import date
import re
import warnings
from docutils import nodes
from recommonmark.transform import AutoStructify
from recommonmark.parser import CommonMarkParser, splitext, urlparse
Expand Down Expand Up @@ -116,6 +115,7 @@
'versions_unstable': UNSTABLE_VERSIONS,
'versions_deprecated': DEPRECATED_VERSIONS,
'hide_version_dropdown': ['scylla-3.x'],
'skip_warnings': 'document_has_underscores'
}

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


def build_inited(app):
warnings.filterwarnings(
action="ignore",
message=r".*Document name contains underscores:.*",
)

def build_finished(app, exception):
version_name = os.getenv("SPHINX_MULTIVERSION_NAME", "")
version_name = "/" + version_name if version_name else ""
Expand All @@ -185,9 +179,6 @@ def build_finished(app, exception):
redirects_cli.create(redirect_to=redirect_to,out_file=out_file)

def setup(app):
# Filter warnings
app.connect('builder-inited', build_inited)

# Setup Markdown parser
app.add_source_parser(CustomCommonMarkParser)
app.add_config_value('recommonmark_config', {
Expand All @@ -207,4 +198,4 @@ def setup(app):

# Create redirect to JavaDoc API
app.connect('build-finished', build_finished)

0 comments on commit 2601b78

Please sign in to comment.