Avoid attribute indirection with `env` (#13212)

This commit is contained in:
Adam Turner
2025-01-05 09:10:55 +00:00
committed by GitHub
parent 56c9e32fbc
commit 83bf866059
42 changed files with 181 additions and 160 deletions

View File

@@ -76,7 +76,7 @@ def process_todo_nodes(app, doctree, fromdocname):
# Replace all todolist nodes with a list of the collected todos.
# Augment each todo with a backlink to the original location.
env = app.builder.env
env = app.env
if not hasattr(env, 'todo_all_todos'):
env.todo_all_todos = []