Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jan 9, 2025
1 parent 01d319b commit 4606248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinx/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ class Keyboard(SphinxRole):
# capture ('-', '+', '^', or whitespace) in between any two characters
_pattern: Final = re.compile(r'(?<=.)([\-+^]| +)(?=.)')

def run(self) -> tuple[list[Element | nodes.Text], list[system_message]]:
def run(self) -> tuple[list[Node], list[system_message]]:
classes = ['kbd']
if 'classes' in self.options:
classes.extend(self.options['classes'])
Expand All @@ -497,7 +497,7 @@ def run(self) -> tuple[list[Element | nodes.Text], list[system_message]]:
if len(parts) == 1 or self._is_multi_word_key(parts):
return [nodes.literal(self.rawtext, self.text, classes=classes)], []

compound = []
compound: list[Node] = []
while parts:
if self._is_multi_word_key(parts):
key = ''.join(parts[:3])
Expand Down

0 comments on commit 4606248

Please sign in to comment.