Skip to content

Commit e9ee9cd

Browse files
committed
Attempt to import sphixcontrib-spelling, if fails pass
1 parent 384f4d3 commit e9ee9cd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/source/conf.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,18 @@
7373
'sphinx.ext.ifconfig',
7474
'sphinx.ext.linkcode',
7575
'nbsphinx',
76-
'sphinxcontrib.spelling'
7776
]
7877

7978
exclude_patterns = ['**.ipynb_checkpoints']
8079

81-
spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt']
82-
spelling_ignore_pypi_package_names = True
80+
# Tries to import sphixcontrib.spelling - if not available pass
81+
try:
82+
import sphinxcontrib.spelling
83+
extensions.append('sphinxcontrib.spelling')
84+
spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt']
85+
spelling_ignore_pypi_package_names = True
86+
except ModuleNotFoundError:
87+
pass
8388

8489
with open("index.rst") as f:
8590
index_rst_lines = f.readlines()

0 commit comments

Comments
 (0)