From 35ed39c946c7f6fb2d579f0948acd1f8773c1c1e Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Fri, 22 Apr 2022 03:34:31 +0100 Subject: Use `Node.findall` --- doc/development/tutorials/examples/todo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/development/tutorials') 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 -- cgit v1.2.1