From 97b88fd825007d61fd245b065cd72c8de8c49447 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Thu, 11 Jul 2024 16:19:44 +0200 Subject: [PATCH] Fix typing issue with new version of types-docutils released` (#40727) --- docs/exts/substitution_extensions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/exts/substitution_extensions.py b/docs/exts/substitution_extensions.py index 12827b29d7800..faa9501ffee77 100644 --- a/docs/exts/substitution_extensions.py +++ b/docs/exts/substitution_extensions.py @@ -28,7 +28,6 @@ from sphinx.transforms.post_transforms.code import HighlightLanguageTransform if TYPE_CHECKING: - from docutils.utils import SystemMessage from sphinx.application import Sphinx LOGGER = logging.getLogger(__name__) @@ -86,7 +85,7 @@ def condition(node): node.rawsource = node.astext() -def substitution_code_role(*args, **kwargs) -> tuple[list, list[SystemMessage]]: +def substitution_code_role(*args, **kwargs) -> tuple[list, list[Any]]: """Decorate an inline code so that SubstitutionCodeBlockTransform will notice it""" [node], system_messages = code_role(*args, **kwargs) node[_SUBSTITUTION_OPTION_NAME] = True # type: ignore[index]