Skip to content

Commit 7c3b4f0

Browse files
authored
chore(docs): use iterator findall over traverse (#1453)
1 parent 13d648e commit 7c3b4f0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/extensions/attributetable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def process_attributetable(app: Sphinx, doctree: nodes.document, docname: str) -
189189
env = app.builder.env
190190

191191
lookup = build_lookup_table(env)
192-
for node in doctree.traverse(attributetableplaceholder):
192+
for node in doctree.findall(attributetableplaceholder):
193193
modulename, classname, fullname = (
194194
node["python-module"],
195195
node["python-class"],

docs/extensions/fulltoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def build_full_toctree(
116116
env: BuildEnvironment = builder.env
117117
doctree = env.get_doctree(index)
118118
toctrees: list[nodes.Element] = []
119-
for toctreenode in doctree.traverse(addnodes.toctree):
119+
for toctreenode in doctree.findall(addnodes.toctree):
120120
toctree = env.resolve_toctree(
121121
docname,
122122
builder,

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ voice = [
5555
]
5656
docs = [
5757
"sphinx==7.0.1",
58+
"docutils>=0.18.1",
5859
"sphinxcontrib-trio~=1.1.2",
5960
"sphinx-hoverxref==1.3.0",
6061
"sphinx-autobuild~=2021.3",

0 commit comments

Comments
 (0)