From 9f47a57b0f52fa08b7eedb95ec1d622811bc35df Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 16 Jan 2024 02:28:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=85=20Restructure=20`spelling`=20modul?= =?UTF-8?q?e=20check=20@=20conf.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 178a13cb5..abed8d781 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,6 +17,7 @@ import os import re +from contextlib import suppress from pathlib import Path from sphinx.addnodes import pending_xref @@ -81,12 +82,11 @@ ] -try: - import sphinxcontrib.spelling +with suppress(ImportError): + # spelling extension is optional, only add it when installed + import sphinxcontrib.spelling # noqa extensions.append("sphinxcontrib.spelling") -except ImportError: - pass intersphinx_mapping = { "pyperf": ("https://pyperf.readthedocs.io/en/latest", None),