Skip to content

Commit 1e3c8a0

Browse files
committed
Attempt to import sphixcontrib-spelling, if fails pass
1 parent 478b058 commit 1e3c8a0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/source/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,14 @@
8787

8888
exclude_patterns = ['**.ipynb_checkpoints']
8989

90-
spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt']
91-
spelling_ignore_pypi_package_names = True
90+
# Tries to import sphixcontrib.spelling - if not available pass
91+
try:
92+
import sphinxcontrib.spelling
93+
extensions.append('sphinxcontrib.spelling')
94+
spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt']
95+
spelling_ignore_pypi_package_names = True
96+
except ModuleNotFoundError:
97+
pass
9298

9399
with open("index.rst") as f:
94100
index_rst_lines = f.readlines()

0 commit comments

Comments
 (0)