Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-10-26 20:05:36 +0300
committerGitHub <noreply@github.com>2021-10-26 20:05:36 +0300
commit096108ccacfc6ae019d4e94b8be1abafc574ed08 (patch)
tree4718b645bc5cfca85ac2f244569acb58ab3fa663 /sphinx/util
parentced8895b127c6ea84c74dc4df495d0f5e2560d74 (diff)
parentd8b92bb1dc30b8f43f6085fdde88a466e0fe80d5 (diff)
Merge branch '4.x' into 9756_classmethod_not_having_func
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/nodes.py4
-rw-r--r--sphinx/util/typing.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index 78663e4c7..bc16e44c1 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -343,7 +343,7 @@ def clean_astext(node: Element) -> str:
node = node.deepcopy()
for img in node.traverse(nodes.image):
img['alt'] = ''
- for raw in node.traverse(nodes.raw):
+ for raw in list(node.traverse(nodes.raw)):
raw.parent.remove(raw)
return node.astext()
@@ -408,7 +408,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())
- for toctreenode in tree.traverse(addnodes.toctree):
+ for toctreenode in list(tree.traverse(addnodes.toctree)):
newnodes = []
includefiles = map(str, toctreenode['includefiles'])
for includefile in includefiles:
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
index 87707d48f..a2ab5f931 100644
--- a/sphinx/util/typing.py
+++ b/sphinx/util/typing.py
@@ -144,7 +144,7 @@ def restify(cls: Optional[Type]) -> str:
else:
return _restify_py36(cls)
except (AttributeError, TypeError):
- return repr(cls)
+ return inspect.object_description(cls)
def _restify_py37(cls: Optional[Type]) -> str: