Skip to content

Commit

Permalink
Use Node.findall over Node.traverse (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
picnixz authored and AA-Turner committed Jan 13, 2024
1 parent d3411a6 commit 6401cf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinxcontrib/devhelp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def write_toc(node: nodes.Node, parent: etree.Element) -> None:
parent.attrib['name'] = node.astext()

matcher = NodeMatcher(addnodes.compact_paragraph, toctree=Any)
for node in tocdoc.traverse(matcher): # type: addnodes.compact_paragraph
for node in tocdoc.findall(matcher): # type: addnodes.compact_paragraph
write_toc(node, chapters)

# Index
Expand Down

0 comments on commit 6401cf7

Please sign in to comment.