summaryrefslogtreecommitdiff
path: root/doc/development/tutorials/examples/todo.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2022-04-22 03:34:31 +0100
committerAdam Turner <9087854+AA-Turner@users.noreply.github.com>2022-04-22 04:21:39 +0100
commit35ed39c946c7f6fb2d579f0948acd1f8773c1c1e (patch)
treedf4ff9c13c420ecb903f45133239b1295131c69e /doc/development/tutorials/examples/todo.py
parentcbe0c99181ba9398b5905a34dde7dc96dd369fd8 (diff)
downloadsphinx-git-35ed39c946c7f6fb2d579f0948acd1f8773c1c1e.tar.gz
Use `Node.findall`
Diffstat (limited to 'doc/development/tutorials/examples/todo.py')
-rw-r--r--doc/development/tutorials/examples/todo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/development/tutorials/examples/todo.py b/doc/development/tutorials/examples/todo.py
index 61eaac388..15368f440 100644
--- a/doc/development/tutorials/examples/todo.py
+++ b/doc/development/tutorials/examples/todo.py
@@ -70,7 +70,7 @@ def merge_todos(app, env, docnames, other):
def process_todo_nodes(app, doctree, fromdocname):
if not app.config.todo_include_todos:
- for node in doctree.traverse(todo):
+ for node in doctree.findall(todo):
node.parent.remove(node)
# Replace all todolist nodes with a list of the collected todos.
@@ -80,7 +80,7 @@ def process_todo_nodes(app, doctree, fromdocname):
if not hasattr(env, 'todo_all_todos'):
env.todo_all_todos = []
- for node in doctree.traverse(todolist):
+ for node in doctree.findall(todolist):
if not app.config.todo_include_todos:
node.replace_self([])
continue