Skip to content

Commit d33bd7d

Browse files
authored
Merge pull request #3316 from bdarnell/fix-docs-build
docs: Fix build after readthedocs/readthedocs.org#10638
2 parents a192634 + 37770e2 commit d33bd7d

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

docs/conf.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import sphinx.errors
33
import sys
44

5+
import sphinx_rtd_theme
6+
57
# Ensure we get the local copy of tornado instead of what's on the standard path
68
sys.path.insert(0, os.path.abspath(".."))
79
import tornado
@@ -84,16 +86,8 @@
8486

8587
intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
8688

87-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
88-
89-
# On RTD we can't import sphinx_rtd_theme, but it will be applied by
90-
# default anyway. This block will use the same theme when building locally
91-
# as on RTD.
92-
if not on_rtd:
93-
import sphinx_rtd_theme
94-
95-
html_theme = "sphinx_rtd_theme"
96-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
89+
html_theme = "sphinx_rtd_theme"
90+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
9791

9892
# Suppress warnings about "class reference target not found" for these types.
9993
# In most cases these types come from type annotations and are for mypy's use.

0 commit comments

Comments
 (0)