Skip to content

Commit

Permalink
Additional type-ignore after types-docutils (#37859)
Browse files Browse the repository at this point in the history
Turns out we also need to ignore index error on the type returned
from docutils - because it's not a specific type but Any.

(cherry picked from commit ab21a6c)
  • Loading branch information
potiuk authored and ephraimbuddy committed Mar 7, 2024
1 parent 0c8440e commit 948ec96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/exts/substitution_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def condition(node):
def substitution_code_role(*args, **kwargs) -> tuple[list, list[SystemMessage]]:
"""Decorate an inline code so that SubstitutionCodeBlockTransform will notice it"""
[node], system_messages = code_role(*args, **kwargs)
node[_SUBSTITUTION_OPTION_NAME] = True
node[_SUBSTITUTION_OPTION_NAME] = True # type: ignore[index]

return [node], system_messages

Expand Down

0 comments on commit 948ec96

Please sign in to comment.