diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-07-03 22:40:34 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-07-03 22:40:34 +0900 |
commit | 3d175d9a2423e52e549f003700abb42c7a9db21f (patch) | |
tree | 01e7b8612b93cefcd7502b0b292ee247df4b310a /sphinx/util/nodes.py | |
parent | 80198e82aa9174802cb1eb30d69ce7fe98e24399 (diff) | |
parent | 2ac802fbd430513560529fda11b0dbe312787eea (diff) | |
download | sphinx-git-3d175d9a2423e52e549f003700abb42c7a9db21f.tar.gz |
Merge branch '5.x'
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r-- | sphinx/util/nodes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 4abc3afa4..1a861a060 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -3,7 +3,7 @@ import re import unicodedata from typing import (TYPE_CHECKING, Any, Callable, Iterable, List, Optional, Set, Tuple, Type, - Union, cast) + Union) from docutils import nodes from docutils.nodes import Element, Node @@ -412,7 +412,7 @@ def inline_all_toctrees(builder: "Builder", docnameset: Set[str], docname: str, Record all docnames in *docnameset*, and output docnames with *colorfunc*. """ - tree = cast(nodes.document, tree.deepcopy()) + tree = tree.deepcopy() for toctreenode in list(tree.findall(addnodes.toctree)): newnodes = [] includefiles = map(str, toctreenode['includefiles']) |