Skip to content

Commit

Permalink
More typing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobandersen committed Feb 24, 2022
1 parent 58f215a commit 8178926
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import re
import textwrap
from typing import Any, Callable, cast, Dict, List, Optional, Type, Union
from typing import Any, Callable, cast, Dict, List, Optional, Sequence, Type, Union

ContentCallback = Callable[[addnodes.desc_content], None]
Declarator = Union[addnodes.desc_signature, addnodes.desc_signature_line]
Expand Down Expand Up @@ -1740,15 +1740,15 @@ def visit_inc(self, node: compoundsuper.incType) -> List[nodes.container]:
if not self.app.config.breathe_show_include:
return []

compound_link = [nodes.Text("", node.content_[0].getValue())]
compound_link: List[Node] = [nodes.Text("", node.content_[0].getValue())]
if node.get_refid():
compound_link = self.visit_docreftext(node)
if node.local == "yes":
text = [nodes.Text('#include "'), *compound_link, nodes.Text('"')]
else:
text = [nodes.Text("#include <"), *compound_link, nodes.Text(">")]

return [nodes.container("", nodes.emphasis("", *text))]
return [nodes.container("", nodes.emphasis("", "", *text))]

def visit_ref(self, node: compoundsuper.refType) -> List[Node]:
def get_node_info(file_data):
Expand Down Expand Up @@ -1861,7 +1861,7 @@ def visit_docvarlistentry(self, node) -> List[Node]:
content = node.term.content_
return self.render_iterable(content)

def visit_docanchor(self, node) -> List[Node]:
def visit_docanchor(self, node) -> Sequence[Node]:
return self.create_doxygen_target(node)

def visit_docentry(self, node) -> List[Node]:
Expand Down

0 comments on commit 8178926

Please sign in to comment.