Skip to content

Commit

Permalink
Updates based on CI environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobandersen committed Dec 29, 2021
1 parent 204bce1 commit fa27f60
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion breathe/directives/class_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from breathe.renderer.target import create_target_handler

from docutils.nodes import Node
from docutils.parsers.rst.directives import unchanged_required, unchanged, flag
from docutils.parsers.rst.directives import unchanged_required, unchanged, flag # type: ignore

from typing import Any, List

Expand Down
2 changes: 1 addition & 1 deletion breathe/directives/content_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from breathe.renderer.target import create_target_handler

from docutils.nodes import Node
from docutils.parsers.rst.directives import unchanged_required, flag
from docutils.parsers.rst.directives import unchanged_required, flag # type: ignore

from typing import Any, List

Expand Down
2 changes: 1 addition & 1 deletion breathe/directives/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from breathe.renderer.sphinxrenderer import SphinxRenderer
from breathe.renderer.target import create_target_handler

from docutils.parsers.rst.directives import unchanged_required, flag
from docutils.parsers.rst.directives import unchanged_required, flag # type: ignore


class _BaseFileDirective(BaseDirective):
Expand Down
2 changes: 1 addition & 1 deletion breathe/directives/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from breathe.renderer.target import create_target_handler

from docutils.nodes import Node
from docutils.parsers.rst.directives import unchanged_required, flag
from docutils.parsers.rst.directives import unchanged_required, flag # type: ignore

from sphinx.domains import cpp

Expand Down
2 changes: 1 addition & 1 deletion breathe/directives/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from breathe.renderer.sphinxrenderer import SphinxRenderer
from breathe.renderer.target import create_target_handler

from docutils.parsers.rst.directives import unchanged_required, flag
from docutils.parsers.rst.directives import unchanged_required, flag # type: ignore


class RootDataObject:
Expand Down
2 changes: 1 addition & 1 deletion breathe/directives/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from docutils.nodes import Node

from docutils.parsers.rst.directives import unchanged_required, flag
from docutils.parsers.rst.directives import unchanged_required, flag # type: ignore

from typing import Any, List

Expand Down
18 changes: 9 additions & 9 deletions breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,16 +907,16 @@ def pullup(node, typ, dest):
f: nodes.field
fn: nodes.field_name
fb: nodes.field_body
for f in fieldLists[0]: # type: ignore
fn, fb = f # type: ignore
for f in fieldLists[0]:
fn, fb = f
assert len(fn) == 1
if fn.astext().startswith("returns "):
retvals.append(f)
else:
others.append(f)
if len(retvals) != 0:
items: List[nodes.paragraph] = []
for fn, fb in retvals: # type: ignore
for fn, fb in retvals:
# we created the retvals before, so we made this prefix
assert fn.astext().startswith("returns ")
val = nodes.strong("", fn.astext()[8:])
Expand All @@ -942,9 +942,9 @@ def pullup(node, typ, dest):
fieldLists = [fl]

if self.app.config.breathe_order_parameters_first:
return detailed + fieldLists + admonitions # type: ignore
return detailed + fieldLists + admonitions
else:
return detailed + admonitions + fieldLists # type: ignore
return detailed + admonitions + fieldLists

def update_signature(self, signature, obj_type):
"""Update the signature node if necessary, e.g. add qualifiers."""
Expand Down Expand Up @@ -1829,7 +1829,7 @@ def visit_docvarlistentry(self, node) -> List[Node]:
return self.render_iterable(content)

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

def visit_docentry(self, node) -> List[Node]:
col = nodes.entry()
Expand All @@ -1844,7 +1844,7 @@ def visit_docentry(self, node) -> List[Node]:

def visit_docrow(self, node) -> List[Node]:
row = nodes.row()
cols = cast(List[nodes.entry], self.render_iterable(node.entry))
cols = self.render_iterable(node.entry)
elem: Union[nodes.thead, nodes.tbody]
if all(col.get("heading", False) for col in cols):
elem = nodes.thead()
Expand All @@ -1863,7 +1863,7 @@ def visit_doctable(self, node) -> List[Node]:
colspec.attributes["colwidth"] = "auto"
tgroup += colspec
table += tgroup
rows = cast(List[Element], self.render_iterable(node.row))
rows = self.render_iterable(node.row)

# this code depends on visit_docrow(), and expects the same elements used to
# "envelop" rows there, namely thead and tbody (eg it will need to be updated
Expand Down Expand Up @@ -1994,7 +1994,7 @@ def visit_function(self, node) -> List[Node]:
# Insert Doxygen target into the first signature node.
if not self.app.env.config.breathe_debug_trace_doxygen_ids:
target = self.create_doxygen_target(node)
rst_node.children[0].insert(0, target) # type: ignore
rst_node.children[0].insert(0, target)

finder.content.extend(self.description(node))
return nodes
Expand Down

0 comments on commit fa27f60

Please sign in to comment.