Skip to content

Commit

Permalink
add env var to controll activation of spelling extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Cielquan committed Mar 23, 2024
1 parent 8802dcb commit 2e6baa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@

import sphinx.ext.autodoc
import sphinx_rtd_theme # type: ignore[import-untyped]
from sphinx.application import Sphinx

from formelsammlung import __author__, __gh_repository_link__, __project__, __version__

from sphinx.application import Sphinx

needs_sphinx = "3.1" #: Minimum Sphinx version to build the docs

Expand Down Expand Up @@ -164,7 +162,7 @@ def _remove_module_docstring( # pylint: disable=R0913
spelling_show_suggestions = True
spelling_exclude_patterns = ["autoapi/**", "autoapidoc/**"]

if find_spec("sphinxcontrib.spelling") is not None:
if find_spec("sphinxcontrib.spelling") is not None and os.environ["SPHINX_SPELLING"] == "true":
extensions.append("sphinxcontrib.spelling")
else:
NOT_LOADED_MSGS.append("## 'sphinxcontrib-spelling' extension not loaded - not installed")
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ set_env =
coverage: TOXENV_BUILDER = coverage
doctest: TOXENV_BUILDER = doctest
spelling: TOXENV_BUILDER = spelling
spelling: SPHINX_SPELLING = true
extras = {[testenv:docs]extras}
commands =
sphinx-build \
Expand Down

0 comments on commit 2e6baa5

Please sign in to comment.