Skip to content

Commit

Permalink
Fix typing issue with new version of types-docutils released` (#40727)
Browse files Browse the repository at this point in the history
(cherry picked from commit 97b88fd)
  • Loading branch information
potiuk authored and ephraimbuddy committed Jul 12, 2024
1 parent e847879 commit 81845de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/exts/substitution_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 81845de

Please sign in to comment.