https://github.com/python/cpython/commit/3f3e1c4095ae229b0c6d0364f289a20732281a96
commit: 3f3e1c4095ae229b0c6d0364f289a20732281a96
branch: main
author: Adam Turner <[email protected]>
committer: AA-Turner <[email protected]>
date: 2025-02-26T20:10:55Z
summary:
Doc: Strip trailing whitespace in ``pydoc_topics`` (#130492)
files:
M Doc/tools/extensions/pydoc_topics.py
diff --git a/Doc/tools/extensions/pydoc_topics.py
b/Doc/tools/extensions/pydoc_topics.py
index 6e43df2e4bf9de..0f3dfacd4f2f87 100644
--- a/Doc/tools/extensions/pydoc_topics.py
+++ b/Doc/tools/extensions/pydoc_topics.py
@@ -143,7 +143,8 @@ def write_documents(self, _docnames: Set[str]) -> None:
document.append(doc_ids[label_id])
visitor = TextTranslator(document, builder=self)
document.walkabout(visitor)
- self.topics[topic_label] = visitor.body
+ body = "\n".join(map(str.rstrip, visitor.body.splitlines()))
+ self.topics[topic_label] = body
def finish(self) -> None:
topics_repr = "\n".join(
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]