https://github.com/python/cpython/commit/c7ac503f4b766eb2aa49731f0160b4aabac06d84 commit: c7ac503f4b766eb2aa49731f0160b4aabac06d84 branch: 3.12 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: AA-Turner <9087854+aa-tur...@users.noreply.github.com> date: 2025-02-27T14:26:42Z summary:
[3.12] Doc: Strip trailing whitespace in ``pydoc_topics`` (GH-130492) (#130636) (cherry picked from commit 3f3e1c4095ae229b0c6d0364f289a20732281a96) Co-authored-by: Adam Turner <9087854+aa-tur...@users.noreply.github.com> 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 27de4302710785..86d929fdd90252 100644 --- a/Doc/tools/extensions/pydoc_topics.py +++ b/Doc/tools/extensions/pydoc_topics.py @@ -142,7 +142,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 -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com