Skip to content

Commit

Permalink
findall instead of traverse for docutils nodes
Browse files Browse the repository at this point in the history
closes #119317
  • Loading branch information
drts01 committed May 21, 2024
1 parent c4722cd commit 2312026
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ blurb

sphinx-autobuild
sphinxext-opengraph==0.7.5
sphinx-notfound-page==1.0.0
sphinx-notfound-page==1.0.1

# The theme used by the documentation is stored separately, so we need
# to install that as well.
Expand Down
4 changes: 2 additions & 2 deletions Doc/tools/extensions/glossary_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def process_glossary_nodes(app, doctree, fromdocname):

terms = {}

for node in doctree.traverse(glossary):
for glossary_item in node.traverse(definition_list_item):
for node in doctree.findall(glossary):
for glossary_item in node.findall(definition_list_item):
term = glossary_item[0].astext().lower()
definition = glossary_item[1]

Expand Down
4 changes: 2 additions & 2 deletions Doc/tools/extensions/pyspecific.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def parse_monitoring_event(env, sig, signode):


def process_audit_events(app, doctree, fromdocname):
for node in doctree.traverse(audit_event_list):
for node in doctree.findall(audit_event_list):
break
else:
return
Expand Down Expand Up @@ -663,7 +663,7 @@ def process_audit_events(app, doctree, fromdocname):

body += row

for node in doctree.traverse(audit_event_list):
for node in doctree.findall(audit_event_list):
node.replace_self(table)


Expand Down

0 comments on commit 2312026

Please sign in to comment.